Skip to content

Commit 4268947

Browse files
committed
revert fatal os.remove
1 parent 2ef9809 commit 4268947

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/upload.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@
6767

6868
try:
6969
esptool.main(cmdline)
70-
if erase_file:
71-
os.remove(erase_file)
7270
except Exception as e:
7371
sys.stderr.write(f"\nA fatal upload.py error occurred: {repr(e)}\n")
7472
exit_code = 2
7573

74+
if erase_file:
75+
try:
76+
os.remove(erase_file)
77+
except:
78+
pass
79+
7680
sys.exit(exit_code)

0 commit comments

Comments
 (0)