summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-18 00:51:22 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-18 00:51:22 (GMT)
commit68937b4cbcc3e88d4207e6391a311f9b7d067b71 (patch)
treeb5fffb2ee6c7f523ced6f49f9ab35bc22413cbcf /Lib/xmlrpclib.py
parent7ac9d4020100b99b17eeddf65bafa8e87f9f293a (diff)
downloadcpython-68937b4cbcc3e88d4207e6391a311f9b7d067b71.zip
cpython-68937b4cbcc3e88d4207e6391a311f9b7d067b71.tar.gz
cpython-68937b4cbcc3e88d4207e6391a311f9b7d067b71.tar.bz2
Change some uses of cStringIO.StringIO to io.StringIO.
This is undoubtedly insufficient and in some cases just as broken as before.
Diffstat (limited to 'Lib/xmlrpclib.py')
-rw-r--r--Lib/xmlrpclib.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index 3347e54..9684ab0 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -370,10 +370,7 @@ def _datetime_type(data):
# @param data An 8-bit string containing arbitrary data.
import base64
-try:
- import cStringIO as StringIO
-except ImportError:
- import StringIO
+import io
class Binary:
"""Wrapper for binary data."""
@@ -404,7 +401,7 @@ class Binary:
def encode(self, out):
out.write("<value><base64>\n")
- base64.encode(StringIO.StringIO(self.data), out)
+ base64.encode(io.StringIO(self.data), out)
out.write("</base64></value>\n")
def _binary(data):