Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4865ed0

Browse files
ignore ssl only on windows
1 parent 0dcf5a4 commit 4865ed0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎tools/get.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,21 @@ def unpack(filename, destination):
6666
shutil.move(dirname, rename_to)
6767

6868
def get_tool(tool):
69+
sys_name = platform.system()
6970
archive_name = tool['archiveFileName']
7071
local_path = dist_dir + archive_name
7172
url = tool['url']
7273
#real_hash = tool['checksum'].split(':')[1]
73-
ctx = ssl.create_default_context()
74-
ctx.check_hostname = False
75-
ctx.verify_mode = ssl.CERT_NONE
74+
if 'CYGWIN_NT' in sys_name:
75+
ctx = ssl.create_default_context()
76+
ctx.check_hostname = False
77+
ctx.verify_mode = ssl.CERT_NONE
7678
if not os.path.isfile(local_path):
7779
print('Downloading ' + archive_name);
78-
urlretrieve(url, local_path, report_progress,context=ctx)
80+
if 'CYGWIN_NT' in sys_name:
81+
urlretrieve(url, local_path, report_progress,context=ctx)
82+
else:
83+
urlretrieve(url, local_path, report_progress)
7984
sys.stdout.write("\rDone\n")
8085
sys.stdout.flush()
8186
else:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /