mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-26 04:05:49 +03:00
[GH-ISSUE #49] exit() not available #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Mar 4, 2019).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/49
I have an exit() in my script and it crashes with:
NameError: name 'exit' is not defined
[15088] Failed to execute script main
Please help
BTW Sorry for the CAPS TITLE._.
@brentvollebregt commented on GitHub (Mar 5, 2019):
If you do some searching, you will find articles like this and this that explain briefly what
exitis and why you should be usingsys.exit().If you do feel this is a bug though, it will be directly related to PyInstaller so you will need to raise an issue over there. The reason this is not linked to auto-py-to-exe is that I do not inject any code into the executables produced as that can potentially be dangerous in terms of setting things up in an unpredictable way and general security.
@ghost commented on GitHub (Mar 5, 2019):
Thanks.
I could bypass the problem with os.abort().
@brentvollebregt commented on GitHub (Mar 6, 2019):
Cool. Importing sys and calling
sys.exit()will produce the exact same exception and result asexit.Closing due to this being resolved.