Fixed unicode error and supported allow_nonstandard_methods in tornado based python client (#7560)

* fixing "decoding Unicode is not supported" error for py2 when data is unicode

* allowing nonstandard methods for tornado python client.

* Making sure to return unicode when needed
This commit is contained in:
shwetas1205
2018-02-02 20:30:04 +05:30
committed by William Cheng
parent ea27924f5c
commit dfbef43743
6 changed files with 6 additions and 6 deletions

View File

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