Change some uses of cStringIO.StringIO to io.StringIO.

This is undoubtedly insufficient and in some cases just as broken as before.
This commit is contained in:
Guido van Rossum 2007-05-18 00:51:22 +00:00
parent 7ac9d40201
commit 68937b4cbc
19 changed files with 26 additions and 89 deletions

View file

@ -2459,10 +2459,7 @@ class TarFileCompat:
def write(self, filename, arcname=None, compress_type=None):
self.tarfile.add(filename, arcname)
def writestr(self, zinfo, bytes):
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from io import StringIO
import calendar
zinfo.name = zinfo.filename
zinfo.size = zinfo.file_size