summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-12-30 02:22:58 +0000
committerGerrit Code Review <review@openstack.org>2013-12-30 02:22:58 +0000
commitce6c54de91f7c129cea11a7648f8668b2f24bca9 (patch)
tree671986cfbc4be9ce119a8ae719da75257ddba09b
parent85cfce17f5e1e74dd10f8d7a4bdcbc8a8422bb32 (diff)
parentf02239cee9e2e422c6c8075b5848216ec7d31f22 (diff)
downloadpython-keystoneclient-ce6c54de91f7c129cea11a7648f8668b2f24bca9.tar.gz
Merge "Make _get_utf8_value Python3 compliant"
-rw-r--r--keystoneclient/contrib/ec2/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/keystoneclient/contrib/ec2/utils.py b/keystoneclient/contrib/ec2/utils.py
index 6383267..a650847 100644
--- a/keystoneclient/contrib/ec2/utils.py
+++ b/keystoneclient/contrib/ec2/utils.py
@@ -101,9 +101,9 @@ class Ec2Signer(object):
@staticmethod
def _get_utf8_value(value):
"""Get the UTF8-encoded version of a value."""
- if not isinstance(value, str) and not isinstance(value, unicode):
+ if not isinstance(value, (six.binary_type, six.text_type)):
value = str(value)
- if isinstance(value, unicode):
+ if isinstance(value, six.text_type):
return value.encode('utf-8')
else:
return value