summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-01-18 17:35:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-01-18 17:35:23 (GMT)
commit2f173fe26b48eddfb76a715db476063e95531ff6 (patch)
tree50787b1f43d06b9c5e15f4dd32cad6c888ba74f7 /Lib/xmlrpclib.py
parent43beaebffb55e0b9250d996fd7a10f6e575f34e0 (diff)
downloadcpython-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.py4
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