提交 4865ed0d 编写于 作者: M me-no-dev

ignore ssl only on windows

上级 0dcf5a49
......@@ -66,16 +66,21 @@ def unpack(filename, destination):
shutil.move(dirname, rename_to)
def get_tool(tool):
sys_name = platform.system()
archive_name = tool['archiveFileName']
local_path = dist_dir + archive_name
url = tool['url']
#real_hash = tool['checksum'].split(':')[1]
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
if 'CYGWIN_NT' in sys_name:
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
if not os.path.isfile(local_path):
print('Downloading ' + archive_name);
urlretrieve(url, local_path, report_progress,context=ctx)
if 'CYGWIN_NT' in sys_name:
urlretrieve(url, local_path, report_progress,context=ctx)
else:
urlretrieve(url, local_path, report_progress)
sys.stdout.write("\rDone\n")
sys.stdout.flush()
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册