Make sure args in run_command are encoded for shlex.split calls on py2.6
This commit is contained in:
parent
d494a163f9
commit
23c5f4524d
1 changed files with 1 additions and 1 deletions
|
@ -1054,7 +1054,7 @@ class AnsibleModule(object):
|
|||
elif isinstance(args, basestring) and use_unsafe_shell:
|
||||
shell = True
|
||||
elif isinstance(args, basestring):
|
||||
args = shlex.split(args)
|
||||
args = shlex.split(args.encode('utf-8'))
|
||||
else:
|
||||
msg = "Argument 'args' to run_command must be list or string"
|
||||
self.fail_json(rc=257, cmd=args, msg=msg)
|
||||
|
|
Loading…
Reference in a new issue