mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-03-27 22:46:38 +08:00
Suppress SSL verification, fixes #1115
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user