From 55bb24fb7d96fa7ce21cf86bb3a81eda677eb8f6 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 12 Apr 2016 07:39:33 -0700 Subject: [PATCH] Reenable unicode=>byte conversion for module parameters to fix integration tests --- lib/ansible/module_utils/basic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index f3a5756daa8..983fcb7ec6d 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -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}') sys.exit(1) + if sys.version_info < (3,): + params = json_dict_unicode_to_bytes(params) + try: self.params = params['ANSIBLE_MODULE_ARGS'] self.constants = params['ANSIBLE_MODULE_CONSTANTS']