]> git.pld-linux.org Git - packages/python-requests.git/blobdiff - system-cert.patch
- release 2 (by relup.sh)
[packages/python-requests.git] / system-cert.patch
index f497bfe8bbb8b6d7add25d3fac55c72a76f1733e..082e93434b7e9685737afd923ee6bc4b122a197c 100644 (file)
@@ -1,14 +1,19 @@
-diff -uNr requests-1.2.3/requests/certs.py requests-1.2.3.new/requests/certs.py
---- requests-1.2.3/requests/certs.py   2013-01-31 14:18:16.000000000 +0100
-+++ requests-1.2.3.new/requests/certs.py       2013-06-26 22:58:37.039694911 +0200
-@@ -17,8 +17,8 @@
- def where():
-     """Return the preferred certificate bundle."""
--    # vendored bundle inside Requests
--    return os.path.join(os.path.dirname(__file__), 'cacert.pem')
-+    # system certificates from ca-certificates package
-+    return "/etc/certs/ca-certificates.crt"
+diff -dur requests-2.18.2.orig/requests/certs.py requests-2.18.2/requests/certs.py
+--- requests-2.18.2.orig/requests/certs.py     2017-05-31 11:19:09.000000000 +0200
++++ requests-2.18.2/requests/certs.py  2017-08-01 14:30:44.000000000 +0200
+@@ -12,7 +12,14 @@
+ environment, you can change the definition of where() to return a separately
+ packaged CA bundle.
+ """
+-from certifi import where
++
++import os
++
++if os.path.exists("/etc/certs/ca-certificates.crt"):
++     def where():
++        return "/etc/certs/ca-certificates.crt"
++else:
++    from certifi import where
  
  if __name__ == '__main__':
      print(where())
This page took 0.10544 seconds and 4 git commands to generate.