summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-02 03:04:52 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-02 03:04:52 (GMT)
commit10ff706e2788a7c7ef9f8ea0108a5ede625fedad (patch)
treed2c08c7f262865884912dc04dd05b36656646851 /Lib/xmlrpclib.py
parentf13eb55d59d80907c9f86574ddd23bce2cb41ff3 (diff)
downloadcpython-10ff706e2788a7c7ef9f8ea0108a5ede625fedad.zip
cpython-10ff706e2788a7c7ef9f8ea0108a5ede625fedad.tar.gz
cpython-10ff706e2788a7c7ef9f8ea0108a5ede625fedad.tar.bz2
Replaced boolean tests with is None.
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 d1edf20..6460aa2 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -755,7 +755,7 @@ def dumps(params, methodname=None, methodresponse=None, encoding=None):
elif methodresponse and isinstance(params, TupleType):
assert len(params) == 1, "response tuple must be a singleton"
- if not encoding:
+ if encoding is None:
encoding = "utf-8"
m = Marshaller(encoding)
@@ -767,7 +767,7 @@ def dumps(params, methodname=None, methodresponse=None, encoding=None):
xmlheader = "<?xml version='1.0'?>\n" # utf-8 is default
# standard XML-RPC wrappings
- if methodname:
+ if methodname is not None:
# a method call
if not isinstance(methodname, StringType):
methodname = methodname.encode(encoding)