From: Cheng Zhao Date: Tue, 10 Feb 2015 09:52:33 +0000 (+0800) Subject: Suppress SSL verification, fixes #1115 X-Git-Tag: v0.21.3~15 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=bedd0a11bacd83d89d09dfe805a3c44da982a895;p=electron.git Suppress SSL verification, fixes #1115 --- diff --git a/script/lib/util.py b/script/lib/util.py index c6f07cea..1c4f26b7 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -4,6 +4,7 @@ import atexit import contextlib import errno import shutil +import ssl import subprocess import sys import tarfile @@ -45,6 +46,9 @@ def scoped_env(key, value): def download(text, url, path): safe_mkdir(os.path.dirname(path)) with open(path, 'wb') as local_file: + if hasattr(ssl, '_create_unverified_context'): + ssl._create_default_https_context = ssl._create_unverified_context + web_file = urllib2.urlopen(url) file_size = int(web_file.info().getheaders("Content-Length")[0]) downloaded_size = 0