forked from pool/python-pip
Accepting request 1202619 from home:dgarcia:branches:devel:languages:python
- Adapt disable-ssl-context-in-buildenv.patch to make it compatible with leap OBS-URL: https://build.opensuse.org/request/show/1202619 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=135
This commit is contained in:
@@ -7,7 +7,7 @@ Index: pip-24.2/src/pip/_vendor/requests/adapters.py
|
||||
extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
|
||||
)
|
||||
-except ImportError:
|
||||
+except (ImportError, FileNotFoundError):
|
||||
+except (ImportError, FileNotFoundError, ssl.SSLError):
|
||||
# Bypass default SSLContext creation when Python
|
||||
# interpreter isn't built with the ssl module.
|
||||
_preloaded_ssl_context = None
|
||||
@@ -22,7 +22,7 @@ Index: pip-24.2/src/pip/_internal/cli/index_command.py
|
||||
- ctx.load_verify_locations(certifi.where())
|
||||
+ try:
|
||||
+ ctx.load_verify_locations(certifi.where())
|
||||
+ except FileNotFoundError:
|
||||
+ except (FileNotFoundError, ssl.SSLError):
|
||||
+ logger.warning("Disabling truststore because of missing certificates")
|
||||
+ return None
|
||||
return ctx
|
||||
|
Reference in New Issue
Block a user