From b5858c19049deab8b4da252b43496c769ccf9f76 Mon Sep 17 00:00:00 2001 From: tobozo Date: Thu, 5 Jan 2017 14:02:56 +0100 Subject: [PATCH] Error Handling for Window10 without CygWin (#117) Added an Exception handling to the offending urlretrieve() call for the issue #108 https://github.com/espressif/arduino-esp32/issues/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. --- tools/get.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/get.py b/tools/get.py index aa6d669c..a13a04e2 100755 --- a/tools/get.py +++ b/tools/get.py @@ -80,7 +80,15 @@ def get_tool(tool): if 'CYGWIN_NT' in sys_name: urlretrieve(url, local_path, report_progress,context=ctx) else: - urlretrieve(url, local_path, report_progress) + try: + urlretrieve(url, local_path, report_progress) + except Exception,e: + print() + print("!!! TLS Failed !!! Download the following file manually and put it in the 'dist' folder:") + print(url) + print("... then run this script again.") + print() + raise Exception('Aborting') sys.stdout.write("\rDone\n") sys.stdout.flush() else: