diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-18 17:35:23 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-18 17:35:23 (GMT) |
commit | 2f173fe26b48eddfb76a715db476063e95531ff6 (patch) | |
tree | 50787b1f43d06b9c5e15f4dd32cad6c888ba74f7 /Lib/xmlrpclib.py | |
parent | 43beaebffb55e0b9250d996fd7a10f6e575f34e0 (diff) | |
download | cpython-2f173fe26b48eddfb76a715db476063e95531ff6.zip cpython-2f173fe26b48eddfb76a715db476063e95531ff6.tar.gz cpython-2f173fe26b48eddfb76a715db476063e95531ff6.tar.bz2 |
Issue #21847: Fixed xmlrpclib and tests on Unicode-disabled builds.
Diffstat (limited to 'Lib/xmlrpclib.py')
-rw-r--r-- | Lib/xmlrpclib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py index db185a6..a1800a1 100644 --- a/Lib/xmlrpclib.py +++ b/Lib/xmlrpclib.py @@ -393,7 +393,7 @@ class DateTime: elif datetime and isinstance(other, datetime.datetime): s = self.value o = other.strftime("%Y%m%dT%H:%M:%S") - elif isinstance(other, (str, unicode)): + elif isinstance(other, basestring): s = self.value o = other elif hasattr(other, "timetuple"): @@ -1560,7 +1560,7 @@ class ServerProxy: allow_none=0, use_datetime=0, context=None): # establish a "logical" server connection - if isinstance(uri, unicode): + if unicode and isinstance(uri, unicode): uri = uri.encode('ISO-8859-1') # get the url |