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 (ESPTOOL-948) #1025

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

return in finally swallows exceptions (ESPTOOL-948) #1025

iritkatriel opened this issue Oct 25, 2024 · 1 comment

Comments

@iritkatriel
Copy link

Operating System

NA

Esptool Version

master branch

Python Version

NA

Full Esptool Command Line that Was Run

NA

Esptool Output

NA

What is the Expected Behaviour?

Avoid return in finally.

More Information

In

return inst
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, or any exception is raised from an except: clause, it will not propagate on as expected.

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

Other Steps to Reproduce

No response

@github-actions github-actions bot changed the title return in finally swallows exceptions return in finally swallows exceptions (ESPTOOL-948) Oct 25, 2024
@Honza0297
Copy link

Hello @iritkatriel and thank you for reporting this!
We will look into this and fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants