mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +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:
parent
a97c57c8fd
commit
45c4375ea7
4 changed files with 29 additions and 2 deletions
|
|
@ -1436,7 +1436,7 @@ def _compile(file, optimize=-1):
|
|||
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