diff options
author | Joshua Harlow <jxharlow@godaddy.com> | 2017-09-19 16:04:21 -0700 |
---|---|---|
committer | Joshua Harlow <jxharlow@godaddy.com> | 2017-09-19 16:04:36 -0700 |
commit | 75b8af3c9fc609226e094bd2e7d94dcdaeae56bb (patch) | |
tree | f330a61158a1eebb6ae559bdae44374bbf01d89b | |
parent | 2b36107f0b6b03c79d184f995dfee4c761d38350 (diff) | |
download | oslo-utils-75b8af3c9fc609226e094bd2e7d94dcdaeae56bb.tar.gz |
Use six.binary_type to point to the right type
Change-Id: Ia6c54b9e8f4be61bc2457e39f8a6f84b9f73d588
-rw-r--r-- | oslo_utils/encodeutils.py | 2 |
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') |