Changeset 977:68c0592b4915


Ignore:
Timestamp:
05/26/19 05:54:07 (5 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

The certificates are set for HTTPS access during update (re #347)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/update.py

    r958 r977  
    1212import traceback
    1313import io
     14import certifi
    1415
    1516if os.name=="nt":
     
    233234    try:
    234235        updateManifest = Manifest()
    235         reply = urllib.request.urlopen(updateURL + "/" + manifestName)
     236        reply = urllib.request.urlopen(updateURL + "/" + manifestName,
     237                                       cafile = certifi.where())
    236238        charset = reply.headers.get_content_charset()
    237239        content = reply.read().decode("utf-8" if charset is None else charset)
     
    368370               
    369371            with open(targetFile, "wb") as fout:
    370                 fin = urllib.request.urlopen(updateURL + "/" + path)
     372                fin = urllib.request.urlopen(updateURL + "/" + path,
     373                                             cafile = certifi.where())
    371374                while True:
    372375                    data = fin.read(256*1024)
Note: See TracChangeset for help on using the changeset viewer.