Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b61914d

Browse files
committed
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".
1 parent 3c1858a commit b61914d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/distutils/archive_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def visit (z, dirname, names):
100100
z.write(path, path)
101101

102102
if not dry_run:
103-
z = zipfile.ZipFile(zip_filename, "wb",
103+
z = zipfile.ZipFile(zip_filename, "w",
104104
compression=zipfile.ZIP_DEFLATED)
105105

106106
os.path.walk(base_dir, visit, z)

0 commit comments

Comments
 (0)