Make async work on python 3 (#4583)

Since dict no longer have a iteritems method, we have to
use six to support python 2 and 3.
reviewable/pr18780/r1
Michael Scherer 8 years ago committed by Toshio Kuratomi
parent cee7473df6
commit 6dd2bc2bff

@ -50,6 +50,7 @@ author:
import datetime
import traceback
from ansible.module_utils.six import iteritems
def main():
@ -95,7 +96,7 @@ def main():
data['finished'] = 0
# Fix error: TypeError: exit_json() keywords must be strings
data = dict([(str(k), v) for k, v in data.iteritems()])
data = dict([(str(k), v) for k, v in iteritems(data)])
module.exit_json(**data)

Loading…
Cancel
Save