summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <jxharlow@godaddy.com>2017-09-19 16:04:21 -0700
committerJoshua Harlow <jxharlow@godaddy.com>2017-09-19 16:04:36 -0700
commit75b8af3c9fc609226e094bd2e7d94dcdaeae56bb (patch)
treef330a61158a1eebb6ae559bdae44374bbf01d89b
parent2b36107f0b6b03c79d184f995dfee4c761d38350 (diff)
downloadoslo-utils-75b8af3c9fc609226e094bd2e7d94dcdaeae56bb.tar.gz
Use six.binary_type to point to the right type
Change-Id: Ia6c54b9e8f4be61bc2457e39f8a6f84b9f73d588
-rw-r--r--oslo_utils/encodeutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oslo_utils/encodeutils.py b/oslo_utils/encodeutils.py
index 597e662..845f916 100644
--- a/oslo_utils/encodeutils.py
+++ b/oslo_utils/encodeutils.py
@@ -111,7 +111,7 @@ def to_utf8(text):
.. versionadded:: 3.5
"""
- if isinstance(text, bytes):
+ if isinstance(text, six.binary_type):
return text
elif isinstance(text, six.text_type):
return text.encode('utf-8')