[python] Convert unicode to six.u (#6881)

`unicode` does not exist in py3, therefore since six is already imported
switch to using `six.u` so that `unicode` is used on py2 and `str` is used
on py3.
This commit is contained in:
Kenny Jones
2017-11-04 11:24:51 -04:00
committed by wing328
parent 7b269eaf4a
commit b6699f6068
10 changed files with 13 additions and 13 deletions

View File

@@ -541,7 +541,7 @@ class ApiClient(object):
try:
return klass(data)
except UnicodeEncodeError:
return unicode(data) # noqa: F821
return six.u(data)
except TypeError:
return data