summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 36bdfa6..ad1473f 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -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