diff options
author | Chris Johns <chrisj@rtems.org> | 2015-03-30 14:30:56 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2015-03-30 14:30:56 +1100 |
commit | bd16849b11c8422cccaa52500b7badb9c6dd7086 (patch) | |
tree | e1ed0ca615edd55bd38d96d195b7df18c1fde5cb | |
parent | sb: Provide an unverified SSL context to the URL. (diff) | |
download | rtems-source-builder-bd16849b11c8422cccaa52500b7badb9c6dd7086.tar.bz2 |
sb: Update the downloader for 2.7.8 and earlier without a context.
-rw-r--r-- | source-builder/sb/download.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py index 032e3ae..5622d4a 100644 --- a/source-builder/sb/download.py +++ b/source-builder/sb/download.py @@ -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') |