mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Only return a path if the cacert.pem file exists.
This will permit the deletion of just that one file in order to fall back to the [probably more accurate but less consistent] Distro provided CA certs.
This commit is contained in:
+3
-1
@@ -29,7 +29,9 @@ CERTIFI_BUNDLE_PATH = None
|
||||
try:
|
||||
# see if requests's own CA certificate bundle is installed
|
||||
from . import certs
|
||||
CERTIFI_BUNDLE_PATH = certs.where()
|
||||
path = certs.where()
|
||||
if os.path.exists(path):
|
||||
CERTIFI_BUNDLE_PATH = certs.where()
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user