From 213029a21e88887217607bb8dff127f37d879970 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Wed, 30 Sep 2015 09:10:18 +0300 Subject: [PATCH] Python 3: don't convert unicode to unicode --- lib/ansible/module_utils/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index e5c53345049..9727cf14a03 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -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)))