Skip to content

Commit

Permalink
revert fatal os.remove
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Aug 1, 2024
1 parent 2ef9809 commit 4268947
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@

try:
esptool.main(cmdline)
if erase_file:
os.remove(erase_file)
except Exception as e:
sys.stderr.write(f"\nA fatal upload.py error occurred: {repr(e)}\n")
exit_code = 2

if erase_file:
try:
os.remove(erase_file)
except:
pass

sys.exit(exit_code)

0 comments on commit 4268947

Please sign in to comment.