summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2016-04-12 07:39:33 -0700
committerToshio Kuratomi <toshio@fedoraproject.org>2016-04-12 08:01:07 -0700
commit55bb24fb7d96fa7ce21cf86bb3a81eda677eb8f6 (patch)
tree289e5773e1073d0757e6434557a3fc3a3867480d
parent75546678d9b7b5e46193da18e4631c0b5ec00f0e (diff)
downloadansible-55bb24fb7d96fa7ce21cf86bb3a81eda677eb8f6.tar.gz
Reenable unicode=>byte conversion for module parameters to fix integration tests
-rw-r--r--lib/ansible/module_utils/basic.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py
index f3a5756daa..983fcb7ec6 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']