summaryrefslogtreecommitdiff
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-03-20 00:35:03 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-03-20 00:35:03 +0000
commita7da8c2204f6bf4263f3e3a3475fac367d8e98a3 (patch)
tree9511d14191ef369354aa1eb0eb359a0ef5d09a9f /Lib/zipfile.py
parent56b7f8709eff32c123a4502822fa38dc0d0a8b36 (diff)
downloadcpython-a7da8c2204f6bf4263f3e3a3475fac367d8e98a3.tar.gz
- Revert a change that should have been blocked: py3k has no -3 flag!
- also remove a bogus debug print
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py27
1 files changed, 8 insertions, 19 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 719ed445fc..2672d0a90e 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -1067,25 +1067,14 @@ class ZipFile:
extract_version = zinfo.extract_version
create_version = zinfo.create_version
- try:
- centdir = struct.pack(structCentralDir,
- stringCentralDir, create_version,
- zinfo.create_system, extract_version, zinfo.reserved,
- zinfo.flag_bits, zinfo.compress_type, dostime, dosdate,
- zinfo.CRC, compress_size, file_size,
- len(zinfo.filename), len(extra_data), len(zinfo.comment),
- 0, zinfo.internal_attr, zinfo.external_attr,
- header_offset)
- except DeprecationWarning:
- print >>sys.stderr, (structCentralDir,
- stringCentralDir, create_version,
- zinfo.create_system, extract_version, zinfo.reserved,
- zinfo.flag_bits, zinfo.compress_type, dostime, dosdate,
- zinfo.CRC, compress_size, file_size,
- len(zinfo.filename), len(extra_data), len(zinfo.comment),
- 0, zinfo.internal_attr, zinfo.external_attr,
- header_offset)
- raise
+ centdir = struct.pack(structCentralDir,
+ stringCentralDir, create_version,
+ zinfo.create_system, extract_version, zinfo.reserved,
+ zinfo.flag_bits, zinfo.compress_type, dostime, dosdate,
+ zinfo.CRC, compress_size, file_size,
+ len(zinfo.filename), len(extra_data), len(zinfo.comment),
+ 0, zinfo.internal_attr, zinfo.external_attr,
+ header_offset)
self.fp.write(centdir)
self.fp.write(zinfo.filename.encode("utf-8"))
self.fp.write(extra_data)