We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39f0c66 commit 7a51337Copy full SHA for 7a51337
requests/certs.py
@@ -11,14 +11,15 @@
11
environment, you can change the definition of where() to return a separately
12
packaged CA bundle.
13
"""
14
-
15
import os.path
16
17
18
-def where():
19
- """Return the preferred certificate bundle."""
20
- # vendored bundle inside Requests
21
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
+try:
+ from certifi import where
+except ImportError:
+ def where():
+ """Return the preferred certificate bundle."""
+ # vendored bundle inside Requests
22
+ return os.path.join(os.path.dirname(__file__), 'cacert.pem')
23
24
if __name__ == '__main__':
25
print(where())
0 commit comments