Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
94e3350b
Commit
94e3350b
authored
Mar 17, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch a unquoted line error. Fixes #6532
parent
b8d5ba42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
lib/ansible/runner/__init__.py
+0
-1
lib/ansible/runner/action_plugins/assemble.py
+2
-0
lib/ansible/utils/__init__.py
+8
-2
No files found.
lib/ansible/runner/__init__.py
View file @
94e3350b
...
...
@@ -28,7 +28,6 @@ import collections
import
socket
import
base64
import
sys
import
shlex
import
pipes
import
jinja2
import
subprocess
...
...
lib/ansible/runner/action_plugins/assemble.py
View file @
94e3350b
...
...
@@ -58,6 +58,7 @@ class ActionModule(object):
options
=
{}
if
complex_args
:
options
.
update
(
complex_args
)
options
.
update
(
utils
.
parse_kv
(
module_args
))
src
=
options
.
get
(
'src'
,
None
)
...
...
@@ -65,6 +66,7 @@ class ActionModule(object):
delimiter
=
options
.
get
(
'delimiter'
,
None
)
remote_src
=
utils
.
boolean
(
options
.
get
(
'remote_src'
,
'yes'
))
if
src
is
None
or
dest
is
None
:
result
=
dict
(
failed
=
True
,
msg
=
"src and dest are required"
)
return
ReturnData
(
conn
=
conn
,
comm_ok
=
False
,
result
=
result
)
...
...
lib/ansible/utils/__init__.py
View file @
94e3350b
...
...
@@ -539,8 +539,14 @@ def parse_kv(args):
if
args
is
not
None
:
# attempting to split a unicode here does bad things
args
=
args
.
encode
(
'utf-8'
)
vargs
=
[
x
.
decode
(
'utf-8'
)
for
x
in
shlex
.
split
(
args
,
posix
=
True
)]
#vargs = shlex.split(str(args), posix=True)
try
:
vargs
=
shlex
.
split
(
args
,
posix
=
True
)
except
ValueError
,
ve
:
if
'no closing quotation'
in
str
(
ve
)
.
lower
():
raise
errors
.
AnsibleError
(
"error parsing argument string, try quoting the entire line."
)
else
:
raise
vargs
=
[
x
.
decode
(
'utf-8'
)
for
x
in
vargs
]
for
x
in
vargs
:
if
"="
in
x
:
k
,
v
=
x
.
split
(
"="
,
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment