mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
use to_text instead of str in async_status (#45990)
* use to_text instead of str in async_status * used to_native instead as per feedback
This commit is contained in:
parent
e9a7a741f8
commit
3453dace85
2 changed files with 4 additions and 1 deletions
|
@ -42,6 +42,7 @@ author:
|
|||
import json
|
||||
import os
|
||||
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
|
@ -93,7 +94,7 @@ def main():
|
|||
data['finished'] = 0
|
||||
|
||||
# Fix error: TypeError: exit_json() keywords must be strings
|
||||
data = dict([(str(k), v) for k, v in iteritems(data)])
|
||||
data = dict([(to_native(k), v) for k, v in iteritems(data)])
|
||||
|
||||
module.exit_json(**data)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue