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

Do not show python traceback when esptool fails #8603

Merged
merged 3 commits into from
Jun 14, 2022

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Jun 14, 2022

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
tools/upload.py Outdated Show resolved Hide resolved
@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
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