diff options
Diffstat (limited to 'dev-python/requests/files/requests-2.5.0-system-cacerts.patch')
-rw-r--r-- | dev-python/requests/files/requests-2.5.0-system-cacerts.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-python/requests/files/requests-2.5.0-system-cacerts.patch b/dev-python/requests/files/requests-2.5.0-system-cacerts.patch new file mode 100644 index 00000000000..f0d9e943e90 --- /dev/null +++ b/dev-python/requests/files/requests-2.5.0-system-cacerts.patch @@ -0,0 +1,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()) |