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

upload.py - exception handling fixes #9186

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Aug 1, 2024

don't check exc_info() in finally, after except Exception as e: block sys module stops tracking it
https://docs.python.org/3/reference/compound_stmts.html#try
https://docs.python.org/3/library/sys.html#sys.exception

#8603 caused error to appear in the log, but build itself was never stopped properly

- don't check exc_info() in `finally`, it only works without `except` with just `try` and `finally`
  see https://docs.python.org/3/reference/compound_stmts.html#try
  after `except Exception as e:` block, `e` is already deleted

- handle a rare case when esptool code does not close 'erase_file'.
  printing paths may cause encoding issues, so just fall through silently
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.

1 participant