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 #1783 from gregorg/fix_bug_python_2.5_json

Bugfix: in hosts with python-2.5, hash keys needs flatten string.
This commit is contained in:
Daniel Hokka Zakrisson 2012-12-19 00:15:09 -08:00
commit ab9e9486ee

View file

@ -89,6 +89,10 @@ def main():
if not 'started' in data: if not 'started' in data:
data['finished'] = 1 data['finished'] = 1
data['ansible_job_id'] = jid data['ansible_job_id'] = jid
# Fix error: TypeError: exit_json() keywords must be strings
data = dict([(str(k), v) for k, v in data.iteritems()])
module.exit_json(**data) module.exit_json(**data)
# this is magic, see lib/ansible/module_common.py # this is magic, see lib/ansible/module_common.py