summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 2476717..048f60a 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -1028,11 +1028,12 @@ class ZipFile:
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
+ self._start_disk = 0
try:
- self.start_dir = self._start_disk = self.fp.tell()
+ self.start_dir = self.fp.tell()
except (AttributeError, OSError):
self.fp = _Tellable(self.fp)
- self.start_dir = self._start_disk = 0
+ self.start_dir = 0
self._seekable = False
else:
# Some file-like objects can provide tell() but not seek()