Changeset 1191:0db341c8c3b3 for src/mlx
- Timestamp:
- 05/30/25 17:37:04 (2 days ago)
- Branch:
- python3
- Phase:
- public
- Tags:
- tip
- Location:
- src/mlx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/common.py
r1047 r1191 1 1 import os 2 import ssl 3 import certifi 2 4 3 5 #----------------------------------------------------------------------------- … … 44 46 45 47 return newDict 48 49 #------------------------------------------------------------------------------- 50 51 sslContext = ssl.create_default_context(cafile = certifi.where()) -
src/mlx/gui/flight.py
r1176 r1191 30 30 from io import StringIO 31 31 import lxml.html 32 import certifi33 32 34 33 #----------------------------------------------------------------------------- … … 3883 3882 3884 3883 # Obtaining the xml 3885 response = urllib.request.urlopen(link, 3886 cafile = certifi.where()) 3884 response = urllib.request.urlopen(link, context = sslContext) 3887 3885 content = etree.iterparse(response) 3888 3886 -
src/mlx/rpc.py
r1170 r1191 3 3 from . import gates 4 4 5 from .common import MAVA_BASE_URL, fixUnpickled 5 from .common import MAVA_BASE_URL, fixUnpickled, sslContext 6 6 7 7 import jsonrpclib … … 10 10 import calendar 11 11 import sys 12 import ssl13 import certifi14 12 15 13 #--------------------------------------------------------------------------------------- … … 727 725 self._getCredentialsFn = getCredentialsFn 728 726 729 sslContext = ssl.SSLContext()730 sslContext.load_verify_locations(cafile = certifi.where())731 727 transport = jsonrpclib.jsonrpc.SafeTransport(jsonrpclib.config.DEFAULT, 732 728 sslContext) -
src/mlx/update.py
r977 r1191 12 12 import traceback 13 13 import io 14 import certifi15 14 16 15 if os.name=="nt": … … 233 232 f = None 234 233 try: 234 from .common import sslContext 235 235 236 updateManifest = Manifest() 236 237 reply = urllib.request.urlopen(updateURL + "/" + manifestName, 237 c afile = certifi.where())238 context = sslContext) 238 239 charset = reply.headers.get_content_charset() 239 240 content = reply.read().decode("utf-8" if charset is None else charset) … … 370 371 371 372 with open(targetFile, "wb") as fout: 373 from .common import sslContext 374 372 375 fin = urllib.request.urlopen(updateURL + "/" + path, 373 c afile = certifi.where())376 context = sslContext) 374 377 while True: 375 378 data = fin.read(256*1024) -
src/mlx/web.py
r1181 r1191 6 6 from . import rpccommon 7 7 8 from .common import MAVA_BASE_URL 8 from .common import MAVA_BASE_URL, sslContext 9 9 from .pirep import PIREP 10 10 … … 629 629 "cookie": "akamai_pilotweb_access=true;" 630 630 }); 631 f = urllib.request.urlopen(request, timeout = 10.0, cafile=certifi.where()) 631 f = urllib.request.urlopen(request, timeout = 10.0, 632 context = sslContext) 632 633 try: 633 634 data = f.read(16384) … … 666 667 try: 667 668 url += data 668 f = urllib.request.urlopen(url, timeout = 10.0, cafile = certifi.where()) 669 f = urllib.request.urlopen(url, timeout = 10.0, 670 context = sslContext) 669 671 try: 670 672 for line in f.readlines():
Note:
See TracChangeset
for help on using the changeset viewer.