Skip to content

Commit

Permalink
Python 3: don't convert unicode to unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Sep 30, 2015
1 parent c7be004 commit 213029a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/module_utils/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def json_dict_bytes_to_unicode(d, encoding='utf-8'):
and dict container types (the containers that the json module returns)
'''

if isinstance(d, str):
if isinstance(d, bytes):
return unicode(d, encoding)
elif isinstance(d, dict):
return dict(imap(json_dict_bytes_to_unicode, iteritems(d), repeat(encoding)))
Expand Down

0 comments on commit 213029a

Please sign in to comment.