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:
data['finished'] = 1
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)
# this is magic, see lib/ansible/module_common.py