Skip to content

Do not show python traceback when esptool fails#8603

Merged
mcspr merged 3 commits into
esp8266:masterfrom
mcspr:nice-upload-py-errors
Jun 14, 2022
Merged

Do not show python traceback when esptool fails#8603
mcspr merged 3 commits into
esp8266:masterfrom
mcspr:nice-upload-py-errors

Conversation

@mcspr

@mcspr mcspr commented Jun 14, 2022

Copy link
Copy Markdown
Collaborator

https://github.com/espressif/esptool/blob/57bd869b64c4eeaaad74791b2f7795264561f06e/esptool/__init__.py#L993-L998
With addition of a finally: branch to handle tmpfile. Otherwise, we get a full traceback for (mostly) no reason.

os.path.join knows what to do
if str: is implicitly checking for length in strings in containers.

Path separator already handled by python
Empty strings are false, implicitly checking for length
Comment thread tools/upload.py Outdated
@mcspr mcspr merged commit 0778980 into esp8266:master Jun 14, 2022
@mcspr mcspr deleted the nice-upload-py-errors branch June 14, 2022 23:39
mcspr added a commit that referenced this pull request Jun 18, 2022
fixup #8603, sys.exc_info is a function
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
Path separator already handled by python
Empty strings are false, implicitly checking for length
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