mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Pete Shinners discovered that zipfile.ZipFile() is called with mode
argument "wb", while the only valid modes are "r", "w" or "a". Fix this by changing the mode to "w".
This commit is contained in:
parent
3c1858a589
commit
b61914dd5b
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue