mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #12004: Fix an internal error in PyZipFile when writing an invalid
Python file. Patch by Ben Morgan.
This commit is contained in:
commit
f7209225bb
4 changed files with 30 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue