From 1ba095c4d406a7cb20b859b27ba4e15bb98be807 Mon Sep 17 00:00:00 2001 From: tobozo Date: Thu, 5 Jan 2017 13:57:01 +0100 Subject: [PATCH] Error Handling for Window10 without CygWin 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 aa6d669cdbf..a13a04e261c 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: