mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
This commit is contained in:
parent
f4158304ac
commit
25fd3928b6
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue