summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
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)