mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Provide an unverified SSL context to the URL.
The RTEMS servers are causing an exception when downloading patches. The solution is provided in PEP-0476 (https://www.python.org/dev/peps/pep-0476/#opting-out).
This commit is contained in:
parent
da801b07fa
commit
3237c8ee69
@ -324,7 +324,13 @@ def _http_downloader(url, local, config, opts):
|
|||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
_in = None
|
_in = None
|
||||||
_in = urllib2.urlopen(url)
|
_ssl_context = None
|
||||||
|
try:
|
||||||
|
import ssl
|
||||||
|
_ssl_context = ssl._create_unverified_context()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
_in = urllib2.urlopen(url, context = _ssl_context)
|
||||||
if url != _in.geturl():
|
if url != _in.geturl():
|
||||||
log.notice(' redirect: %s' % (_in.geturl()))
|
log.notice(' redirect: %s' % (_in.geturl()))
|
||||||
_out = open(path.host(local), 'wb')
|
_out = open(path.host(local), 'wb')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user