Skip to content

Commit

Permalink
Returned get_utf8_value for mturk dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
catleeball authored Mar 27, 2019
1 parent af1f1dd commit 81a0ab5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions boto/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,20 @@ def notify(subject, body=None, html_body=None, to_string=None,
boto.log.exception('notify failed')


def get_utf8_value(value):
if isinstance(value, bytes):
value.decode('utf-8')
return value

if not isinstance(value, six.string_types):
value = six.text_type(value)

if isinstance(value, six.text_type):
value = value.encode('utf-8')

return value


def mklist(value):
if not isinstance(value, list):
if isinstance(value, tuple):
Expand Down

0 comments on commit 81a0ab5

Please sign in to comment.