Changeset 962:a0b8491a5a12


Ignore:
Timestamp:
05/14/19 18:02:09 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Use the certificates for HTTPS access (re #347).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/web.py

    r930 r962  
    2222import xmlrpc.client
    2323import html.parser
     24import certifi
    2425
    2526#---------------------------------------------------------------------------------------
     
    10151016              (icao.upper(),)
    10161017
    1017             f = urllib.request.urlopen(url, timeout = 10.0)
     1018            f = urllib.request.urlopen(url, timeout = 10.0, cafile=certifi.where())
    10181019            try:
    10191020                data = f.read(16384)
     
    10521053                                  ("mostRecentForEachStation", "constraint")])
    10531054        url += data
    1054         f = urllib.request.urlopen(url, timeout = 10.0)
     1055        f = urllib.request.urlopen(url, timeout = 10.0, cafile=certifi.where())
    10551056        try:
    10561057            result = Result()
Note: See TracChangeset for help on using the changeset viewer.