Skip to content

Fix exit bugs of some python scripts #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2016
Merged

Fix exit bugs of some python scripts #903

merged 1 commit into from
Jan 7, 2016

Conversation

panzarino
Copy link
Contributor

Make sure that the system uses sys.exit() rather than just exit() because exit() should not be used in production.

exit() should not be used in production code. This is because it only works if the site module is loaded. Instead, this function should only be used in the interpreter.

Unlike exit() or quit() however, sys.exit() is considered good to use in production code. This is because the sys module will always be there.

Updates old PR: #546

@jrose-apple
Copy link
Contributor

Still seems reasonable. Thanks, Zach!

jrose-apple added a commit that referenced this pull request Jan 7, 2016
Fix exit bugs of some python scripts
@jrose-apple jrose-apple merged commit 2d8a9b0 into swiftlang:master Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants