mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue #16047: Fix module exception list and __file__ handling in freeze.
Patch by Meador Inge.
This commit is contained in:
parent
3a4340325b
commit
c00d39e96a
4 changed files with 16 additions and 4 deletions
|
|
@ -365,6 +365,10 @@ def main():
|
|||
else:
|
||||
mf.load_file(mod)
|
||||
|
||||
# Alias "importlib._bootstrap" to "_frozen_importlib" so that the
|
||||
# import machinery can bootstrap.
|
||||
mf.modules["_frozen_importlib"] = mf.modules["importlib._bootstrap"]
|
||||
|
||||
# Add the main script as either __main__, or the actual module name.
|
||||
if python_entry_is_main:
|
||||
mf.run_script(scriptfile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue