mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Update the downloader for 2.7.8 and earlier without a context.
This commit is contained in:
parent
3237c8ee69
commit
bd16849b11
@ -328,9 +328,11 @@ def _http_downloader(url, local, config, opts):
|
||||
try:
|
||||
import ssl
|
||||
_ssl_context = ssl._create_unverified_context()
|
||||
_in = urllib2.urlopen(url, context = _ssl_context)
|
||||
except:
|
||||
pass
|
||||
_in = urllib2.urlopen(url, context = _ssl_context)
|
||||
_ssl_context = None
|
||||
if _ssl_context is None:
|
||||
_in = urllib2.urlopen(url)
|
||||
if url != _in.geturl():
|
||||
log.notice(' redirect: %s' % (_in.geturl()))
|
||||
_out = open(path.host(local), 'wb')
|
||||
|
Loading…
x
Reference in New Issue
Block a user