]> granicus.if.org Git - python/commitdiff
Pete Shinners discovered that zipfile.ZipFile() is called with mode
authorGuido van Rossum <guido@python.org>
Sat, 14 Apr 2001 16:17:00 +0000 (16:17 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 14 Apr 2001 16:17:00 +0000 (16:17 +0000)
argument "wb", while the only valid modes are "r", "w" or "a".  Fix
this by changing the mode to "w".

Lib/distutils/archive_util.py

index 61bc25ea0f19e42587d19aa705f14ccaf966e197..4c5641b9516bb032c36ef88159e22f0652a1b92a 100644 (file)
@@ -100,7 +100,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0):
                     z.write(path, path)
 
         if not dry_run:
-            z = zipfile.ZipFile(zip_filename, "wb",
+            z = zipfile.ZipFile(zip_filename, "w",
                                 compression=zipfile.ZIP_DEFLATED)
 
             os.path.walk(base_dir, visit, z)