1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #3443 from ajsalminen/arg_unicode_fix

Use .encode() instead of str() to support unicode arguments.
This commit is contained in:
Michael DeHaan 2013-07-05 15:26:29 -07:00
commit aa9385411d

View file

@ -749,7 +749,7 @@ class Runner(object):
complex_args_json = utils.jsonify(complex_args)
# We force conversion of module_args to str because module_common calls shlex.split,
# a standard library function that incorrectly handles Unicode input before Python 2.7.3.
encoded_args = repr(str(module_args))
encoded_args = repr(module_args.encode('utf-8'))
encoded_lang = repr(C.DEFAULT_MODULE_LANG)
encoded_complex = repr(complex_args_json)