summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjanonymous <janonymous.codevulture@gmail.com>2015-06-28 07:34:18 +0530
committerjanonymous <janonymous.codevulture@gmail.com>2015-06-28 07:40:26 +0530
commitef467ddee494a9c0154c31fa6aae781d89ed6abe (patch)
tree6eeb7279a6b282ac3b4e9a84bec33d487ac2d2c1
parent7c716997a8ede3f98741709b0594340df9849a76 (diff)
downloadpython-swiftclient-ef467ddee494a9c0154c31fa6aae781d89ed6abe.tar.gz
Python 3: Replacing unicode with six.text_type for py3 compatibility
The "unicode" type was renamed to "str" in Python 3. Use six.text_type to make swiftclient compatible with Python 3. For more information about changes needed for py3 compatibility, see: https://wiki.openstack.org/wiki/Python3 Change-Id: Ic65607a69935652a1874340928f626fbcc35c014
-rw-r--r--swiftclient/multithreading.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/swiftclient/multithreading.py b/swiftclient/multithreading.py
index c53d987..2778fac 100644
--- a/swiftclient/multithreading.py
+++ b/swiftclient/multithreading.py
@@ -102,7 +102,7 @@ class OutputManager(object):
def _print(self, item, stream=None):
if stream is None:
stream = self.print_stream
- if six.PY2 and isinstance(item, unicode):
+ if six.PY2 and isinstance(item, six.text_type):
item = item.encode('utf8')
print(item, file=stream)