Changeset 3237c8e in rtems-source-builder


Ignore:
Timestamp:
Mar 29, 2015, 4:35:00 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
bd16849
Parents:
da801b0
Message:

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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/download.py

    rda801b0 r3237c8e  
    325325            try:
    326326                _in = None
    327                 _in = urllib2.urlopen(url)
     327                _ssl_context = None
     328                try:
     329                    import ssl
     330                    _ssl_context = ssl._create_unverified_context()
     331                except:
     332                    pass
     333                _in = urllib2.urlopen(url, context = _ssl_context)
    328334                if url != _in.geturl():
    329335                    log.notice(' redirect: %s' % (_in.geturl()))
Note: See TracChangeset for help on using the changeset viewer.