Bug 464080 Lock .jar files before opening them r=Pike

CLOSED TREE
This commit is contained in:
Neil Rashbrook 2008-11-24 16:48:24 +00:00
Родитель 951dd158dd
Коммит 632daa248b
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -50,15 +50,15 @@ class ZipFile(zipfile.ZipFile):
"""
def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED,
lock = False):
zipfile.ZipFile.__init__(self, file, mode, compression)
self._remove = []
self.end = self.fp.tell()
self.debug = 0
if lock:
assert isinstance(file, basestring)
self.lockfile = lockFile(file + '.lck')
else:
self.lockfile = None
zipfile.ZipFile.__init__(self, file, mode, compression)
self._remove = []
self.end = self.fp.tell()
self.debug = 0
def writestr(self, zinfo_or_arcname, bytes):
"""Write contents into the archive.