Skip to content

Fallback exit code to 0 in case of overflow #1745

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
Feb 5, 2020
Merged

Fallback exit code to 0 in case of overflow #1745

merged 1 commit into from
Feb 5, 2020

Conversation

arnavb
Copy link
Contributor

@arnavb arnavb commented Feb 4, 2020

Fixes #1742

This PR changes the exit code to 0 if it overflows by replacing an unwrap() call with unwrap_or(0). Let me know what you think @coolreader18!

Copy link
Member

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for contributing!

@youknowone youknowone merged commit 3960fb8 into RustPython:master Feb 5, 2020
@arnavb arnavb deleted the fix-exit-code branch February 5, 2020 11:05
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.

exit(), panic if code >= 2**31
3 participants