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

Reenable unicode=>byte conversion for module parameters to fix integration tests

This commit is contained in:
Toshio Kuratomi 2016-04-12 07:39:33 -07:00
parent 75546678d9
commit 55bb24fb7d

View file

@ -1447,6 +1447,9 @@ class AnsibleModule(object):
print('{"msg": "Error: Module unable to decode valid JSON on stdin. Unable to figure out what parameters were passed", "failed": true}') print('{"msg": "Error: Module unable to decode valid JSON on stdin. Unable to figure out what parameters were passed", "failed": true}')
sys.exit(1) sys.exit(1)
if sys.version_info < (3,):
params = json_dict_unicode_to_bytes(params)
try: try:
self.params = params['ANSIBLE_MODULE_ARGS'] self.params = params['ANSIBLE_MODULE_ARGS']
self.constants = params['ANSIBLE_MODULE_CONSTANTS'] self.constants = params['ANSIBLE_MODULE_CONSTANTS']