Ignore:
Timestamp:
05/30/25 17:37:04 (4 days ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Tags:
tip
Message:

context is used instead of cafile in urlopen()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/update.py

    r977 r1191  
    1212import traceback
    1313import io
    14 import certifi
    1514
    1615if os.name=="nt":
     
    233232    f = None
    234233    try:
     234        from .common import sslContext
     235
    235236        updateManifest = Manifest()
    236237        reply = urllib.request.urlopen(updateURL + "/" + manifestName,
    237                                        cafile = certifi.where())
     238                                       context = sslContext)
    238239        charset = reply.headers.get_content_charset()
    239240        content = reply.read().decode("utf-8" if charset is None else charset)
     
    370371               
    371372            with open(targetFile, "wb") as fout:
     373                from .common import sslContext
     374
    372375                fin = urllib.request.urlopen(updateURL + "/" + path,
    373                                              cafile = certifi.where())
     376                                             context = sslContext)
    374377                while True:
    375378                    data = fin.read(256*1024)
Note: See TracChangeset for help on using the changeset viewer.