diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-20 08:34:27 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-01-20 08:34:27 (GMT) |
commit | aebb6d3682e08c93d8468a9291180c5cbdc2df1b (patch) | |
tree | ba0911b049da0af81e28d8335224653285bd77e8 /Lib/xmlrpc/client.py | |
parent | 744fdfbf9a749c3adfe01d927af15a5b54e75878 (diff) | |
download | cpython-aebb6d3682e08c93d8468a9291180c5cbdc2df1b.zip cpython-aebb6d3682e08c93d8468a9291180c5cbdc2df1b.tar.gz cpython-aebb6d3682e08c93d8468a9291180c5cbdc2df1b.tar.bz2 |
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.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index 25e684f..bf42835 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, |