summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-05 17:09:41 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-02-05 17:09:41 (GMT)
commit0075690ced8026e68cf96e3bf9310c9002b2d36f (patch)
tree63a660dc5c75ba11299244ce7d42d64471e5ac0b
parent55cd82fe0adc0a7ceb93eb1b6e9de6a25fd7adb9 (diff)
downloadcpython-0075690ced8026e68cf96e3bf9310c9002b2d36f.zip
cpython-0075690ced8026e68cf96e3bf9310c9002b2d36f.tar.gz
cpython-0075690ced8026e68cf96e3bf9310c9002b2d36f.tar.bz2
Patch #1412872: zipfile: use correct system type on unixy systems.
-rw-r--r--Lib/zipfile.py8
-rw-r--r--Misc/NEWS3
2 files changed, 9 insertions, 2 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 93436cf..037843c 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -1,6 +1,6 @@
"Read and write ZIP files."
-import struct, os, time
+import struct, os, time, sys
import binascii
try:
@@ -131,7 +131,11 @@ class ZipInfo:
self.compress_type = ZIP_STORED # Type of compression for the file
self.comment = "" # Comment for each file
self.extra = "" # ZIP extra data
- self.create_system = 0 # System which created ZIP archive
+ if sys.platform == 'win32':
+ self.create_system = 0 # System which created ZIP archive
+ else:
+ # Assume everything else is unix-y
+ self.create_system = 3 # System which created ZIP archive
self.create_version = 20 # Version which created ZIP archive
self.extract_version = 20 # Version needed to extract archive
self.reserved = 0 # Must be zero
diff --git a/Misc/NEWS b/Misc/NEWS
index 1e828d6..d998434 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -358,6 +358,9 @@ Extension Modules
Library
-------
+- Patch #1412872: zipfile now sets the creator system to 3 (Unix)
+ unless the system is Win32.
+
- Patch #1349118: urllib now supports user:pass@ style proxy
specifications, raises IOErrors when proxies for unsupported protocols
are defined, and uses the https proxy on https redirections.