Skip to content
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

return in finally swallows exceptions #124

Closed
iritkatriel opened this issue Oct 28, 2024 · 1 comment
Closed

return in finally swallows exceptions #124

iritkatriel opened this issue Oct 28, 2024 · 1 comment

Comments

@iritkatriel
Copy link

In the following places:



there is a return statement in a finally block, which would swallow any in-flight exception.

This means that if an unhandled exception (including a BaseException such as KeyboardInterrupt) is raised from the try body, it will not propagate on as expected.

If the intention is to suppress all exceptions, I would propose to make this clear by using "except BaseException".

See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.

@fedelemantuano
Copy link
Contributor

Thanks for your contribution.
Fixed in PR #125

fedelemantuano pushed a commit that referenced this issue Nov 4, 2024
* Issue #123: rename module to avoid conflic import

* Issue #123 and #124

* Issue #123 new badge

* Refactoring get_server_ipaddress

* Fixed issue #97
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

No branches or pull requests

2 participants