blob: f0d9e943e90ba2843296d17b874cc97ad59e5b07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- requests-2.5.0/requests/certs.py
+++ requests-2.5.0/requests/certs.py
@@ -13,13 +13,14 @@
"""
import os.path
-try:
- from certifi import where
-except ImportError:
- def where():
- """Return the preferred certificate bundle."""
- # vendored bundle inside Requests
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
+def where():
+ """Return the preferred certificate bundle."""
+ cacerts = '/etc/ssl/certs/ca-certificates.crt'
+ if os.path.exists(cacerts):
+ return cacerts
+
+ # vendored bundle inside Requests
+ return os.path.join(os.path.dirname(__file__), 'cacert.pem')
if __name__ == '__main__':
print(where())
|