summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2005-02-11 18:00:16 (GMT)
committerFred Drake <fdrake@acm.org>2005-02-11 18:00:16 (GMT)
commit688a0ca97b9e78f40f8c2a97150406db712a3547 (patch)
tree083691fe1fd8c8bc712b5efd7d501de5a53834a2 /Lib/xmlrpclib.py
parentd7a6228af3f60bce7dc565bbf175ffe80fdb6506 (diff)
downloadcpython-688a0ca97b9e78f40f8c2a97150406db712a3547.zip
cpython-688a0ca97b9e78f40f8c2a97150406db712a3547.tar.gz
cpython-688a0ca97b9e78f40f8c2a97150406db712a3547.tar.bz2
fix decoding in _stringify to not depend on the default encoding
(closes SF bug #1115989)
Diffstat (limited to 'Lib/xmlrpclib.py')
-rw-r--r--Lib/xmlrpclib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index 7b68196..0c7cee2 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -168,7 +168,7 @@ if unicode:
def _stringify(string):
# convert to 7-bit ascii if possible
try:
- return str(string)
+ return string.encode("ascii")
except UnicodeError:
return string
else: