Skip to content

Commit ed9809f

Browse files
committed
Error Handling for Window10 without CygWin (#117)
Added an Exception handling to the offending urlretrieve() call for the issue #108 espressif/arduino-esp32#108 It's not really a fix but the failure message is much more elegant than the initial stack trace as it hints at the solution to the setup problem rather than confusing the user into Windows problems.
1 parent 2f3ee16 commit ed9809f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/get.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,15 @@ def get_tool(tool):
8080
if 'CYGWIN_NT' in sys_name:
8181
urlretrieve(url, local_path, report_progress,context=ctx)
8282
else:
83-
urlretrieve(url, local_path, report_progress)
83+
try:
84+
urlretrieve(url, local_path, report_progress)
85+
except Exception,e:
86+
print()
87+
print("!!! TLS Failed !!! Download the following file manually and put it in the 'dist' folder:")
88+
print(url)
89+
print("... then run this script again.")
90+
print()
91+
raise Exception('Aborting')
8492
sys.stdout.write("\rDone\n")
8593
sys.stdout.flush()
8694
else:

0 commit comments

Comments
 (0)