Apply Python 3 futurize transform libmodernize.fixes.fix_unicode_type.
This commit is contained in:
parent
a8341dcdff
commit
48f2caf12c
|
@ -21,6 +21,7 @@
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import absolute_import
|
||||||
import simplejson
|
import simplejson
|
||||||
import requests
|
import requests
|
||||||
import time
|
import time
|
||||||
|
@ -36,6 +37,7 @@ from distutils.version import LooseVersion
|
||||||
|
|
||||||
from six.moves.configparser import SafeConfigParser
|
from six.moves.configparser import SafeConfigParser
|
||||||
import logging
|
import logging
|
||||||
|
import six
|
||||||
|
|
||||||
|
|
||||||
__version__ = "0.2.4"
|
__version__ = "0.2.4"
|
||||||
|
@ -244,7 +246,7 @@ class Client(object):
|
||||||
request = {}
|
request = {}
|
||||||
|
|
||||||
for (key, val) in orig_request.iteritems():
|
for (key, val) in orig_request.iteritems():
|
||||||
if not (isinstance(val, str) or isinstance(val, unicode)):
|
if not (isinstance(val, str) or isinstance(val, six.text_type)):
|
||||||
request[key] = simplejson.dumps(val)
|
request[key] = simplejson.dumps(val)
|
||||||
else:
|
else:
|
||||||
request[key] = val
|
request[key] = val
|
||||||
|
|
Loading…
Reference in a new issue