This commit is contained in:
Faik Uygur
2006-04-19 19:06:49 +00:00
parent 7c596671f4
commit efb8c66ce5
+3 -3
View File
@@ -224,9 +224,9 @@ class ZipFileExt(ZipFile):
if zinfo.compress_type == ZIP_DEFLATED: if zinfo.compress_type == ZIP_DEFLATED:
cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION, cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION,
zlib.DEFLATED, -15) zlib.DEFLATED, -15)
else: else:
cmpr = None cmpr = None
while 1: while 1:
buf = fp.read(1024 * 8) buf = fp.read(1024 * 8)
if not buf: if not buf:
@@ -292,7 +292,7 @@ class ZipFileExt(ZipFile):
if not pylzma: if not pylzma:
raise RuntimeError, \ raise RuntimeError, \
"De-compression requires the (missing) pylzma module" "De-compression requires the (missing) pylzma module"
return LzmaFileEntry(self.fp, zinfo.compress_size) return LzmaFileEntry(self.fp, zinfo.compress_size)
else: else:
raise BadZipfile, \ raise BadZipfile, \
"Unsupported compression method %d for file %s" % \ "Unsupported compression method %d for file %s" % \