From 75b8af3c9fc609226e094bd2e7d94dcdaeae56bb Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 19 Sep 2017 16:04:21 -0700 Subject: [PATCH] Use six.binary_type to point to the right type Change-Id: Ia6c54b9e8f4be61bc2457e39f8a6f84b9f73d588 --- oslo_utils/encodeutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_utils/encodeutils.py b/oslo_utils/encodeutils.py index 597e662f..845f9160 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')