oci/opener.py: respect system proxy settings (#48783)

This commit is contained in:
Till Ehrengruber 2025-02-01 09:26:55 +01:00 committed by GitHub
parent 0e8e97a811
commit 392a58e9be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -383,6 +383,7 @@ def create_opener():
"""Create an opener that can handle OCI authentication."""
opener = urllib.request.OpenerDirector()
for handler in [
urllib.request.ProxyHandler(),
urllib.request.UnknownHandler(),
urllib.request.HTTPSHandler(context=spack.util.web.ssl_create_default_context()),
spack.util.web.SpackHTTPDefaultErrorHandler(),