summaryrefslogtreecommitdiff
path: root/Lib/xmlrpc/client.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-01-20 10:41:33 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-01-20 10:41:33 +0200
commit5ccbf79eaea74814a16618879919ff470dc5131f (patch)
tree84a426749f34b3efcabc25bd6429f7eda02806ac /Lib/xmlrpc/client.py
parent5d69e6871a2a0b7e06ca9304eca47428b82e3d38 (diff)
parentaebb6d3682e08c93d8468a9291180c5cbdc2df1b (diff)
downloadcpython-git-5ccbf79eaea74814a16618879919ff470dc5131f.tar.gz
Issue #26147: xmlrpc now works with strings not encodable with used
non-UTF-8 encoding.
Diffstat (limited to 'Lib/xmlrpc/client.py')
-rw-r--r--Lib/xmlrpc/client.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index 25e684f05b..bf42835843 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -955,8 +955,6 @@ def dumps(params, methodname=None, methodresponse=None, encoding=None,
# standard XML-RPC wrappings
if methodname:
# a method call
- if not isinstance(methodname, str):
- methodname = methodname.encode(encoding)
data = (
xmlheader,
"<methodCall>\n"
@@ -1422,7 +1420,7 @@ class ServerProxy:
# call a method on the remote server
request = dumps(params, methodname, encoding=self.__encoding,
- allow_none=self.__allow_none).encode(self.__encoding)
+ allow_none=self.__allow_none).encode(self.__encoding, 'xmlcharrefreplace')
response = self.__transport.request(
self.__host,