Commit ce6c54de authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review

Merge "Make _get_utf8_value Python3 compliant"

parents 85cfce17 f02239ce
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment