forked from pool/python-requests
Accepting request 108727 from devel:languages:python
Useful Python lib OBS-URL: https://build.opensuse.org/request/show/108727 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests?expand=0&rev=1
This commit is contained in:
committed by
Git OBS Bridge
parent
891b8fa2c7
commit
09ef7cfd90
@@ -1,48 +0,0 @@
|
||||
Index: requests-2.9.1/MANIFEST.in
|
||||
===================================================================
|
||||
--- requests-2.9.1.orig/MANIFEST.in
|
||||
+++ requests-2.9.1/MANIFEST.in
|
||||
@@ -1 +1 @@
|
||||
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
|
||||
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
|
||||
Index: requests-2.9.1/requests/adapters.py
|
||||
===================================================================
|
||||
--- requests-2.9.1.orig/requests/adapters.py
|
||||
+++ requests-2.9.1/requests/adapters.py
|
||||
@@ -179,15 +179,13 @@ class HTTPAdapter(BaseAdapter):
|
||||
if verify is not True:
|
||||
cert_loc = verify
|
||||
|
||||
- if not cert_loc:
|
||||
- cert_loc = DEFAULT_CA_BUNDLE_PATH
|
||||
-
|
||||
- if not cert_loc:
|
||||
- raise Exception("Could not find a suitable SSL CA certificate bundle.")
|
||||
-
|
||||
conn.cert_reqs = 'CERT_REQUIRED'
|
||||
|
||||
- if not os.path.isdir(cert_loc):
|
||||
+ if cert_loc is None:
|
||||
+ # use default context
|
||||
+ conn.ca_certs = None
|
||||
+ conn.ca_cert_dir = None
|
||||
+ elif not os.path.isdir(cert_loc):
|
||||
conn.ca_certs = cert_loc
|
||||
else:
|
||||
conn.ca_cert_dir = cert_loc
|
||||
Index: requests-2.9.1/requests/certs.py
|
||||
===================================================================
|
||||
--- requests-2.9.1.orig/requests/certs.py
|
||||
+++ requests-2.9.1/requests/certs.py
|
||||
@@ -18,8 +18,9 @@ try:
|
||||
except ImportError:
|
||||
def where():
|
||||
"""Return the preferred certificate bundle."""
|
||||
- # vendored bundle inside Requests
|
||||
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
|
||||
+ # in openSUSE we rely on ca-certificates instead of
|
||||
+ # having an another bundle
|
||||
+ return '/etc/ssl/ca-bundle.pem'
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(where())
|
Reference in New Issue
Block a user