diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-29 18:15:45 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-29 18:15:45 (GMT) |
commit | f7209225bbc386aa3dd49e5c2c601cd0906ccb53 (patch) | |
tree | 2b047a9f9658fc8eb22d45c57b1224e47e7141b6 /Lib/zipfile.py | |
parent | e5581f9d68b1b7156a2a44d47675604c648d08ff (diff) | |
parent | c5b75db5def1890924d914bc36b54e6a120bf2d7 (diff) | |
download | cpython-f7209225bbc386aa3dd49e5c2c601cd0906ccb53.zip cpython-f7209225bbc386aa3dd49e5c2c601cd0906ccb53.tar.gz cpython-f7209225bbc386aa3dd49e5c2c601cd0906ccb53.tar.bz2 |
Issue #12004: Fix an internal error in PyZipFile when writing an invalid
Python file. Patch by Ben Morgan.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 2fa7a8c..64f9092 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -1604,7 +1604,7 @@ class PyZipFile(ZipFile): print("Compiling", file) try: py_compile.compile(file, doraise=True, optimize=optimize) - except py_compile.PyCompileError as error: + except py_compile.PyCompileError as err: print(err.msg) return False return True |