Skip to content

Commit cefbf25

Browse files
tobozome-no-dev
authored andcommitted
(Real) fix for cygwinless win10 TLS error (#126)
Added a new requirement ( pip install request ) and some logic to get it working, I won't blame you if you reject this PR but this is what made it work on my machine
1 parent ce5df79 commit cefbf25

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tools/get.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import tarfile
1616
import zipfile
1717
import re
18+
import requests
1819
if sys.version_info[0] == 3:
1920
from urllib.request import urlretrieve
2021
else:
@@ -83,12 +84,10 @@ def get_tool(tool):
8384
try:
8485
urlretrieve(url, local_path, report_progress)
8586
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')
87+
                r = requests.get(url)
88+
f = open(local_path, 'wb')
89+
f.write(r.content)
90+
f.close()
9291
sys.stdout.write("\rDone\n")
9392
sys.stdout.flush()
9493
else:

0 commit comments

Comments
 (0)