aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/requests/py3/patches/01-arcadia.patch
blob: 999df2aaa6a8f3759861c785f8fc6a726f22d157 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- contrib/python/requests/py3/requests/adapters.py	(index)
+++ contrib/python/requests/py3/requests/adapters.py	(working tree)
@@ -259,1 +259,1 @@ class HTTPAdapter(BaseAdapter):
-                if not os.path.exists(cert_loc):
+                if isinstance(cert_loc, str) and not os.path.exists(cert_loc):
@@ -267,1 +267,1 @@ class HTTPAdapter(BaseAdapter):
-                if not os.path.isdir(cert_loc):
+                if not isinstance(cert_loc, str) or not os.path.isdir(cert_loc):
--- contrib/python/requests/py3/requests/utils.py	(index)
+++ contrib/python/requests/py3/requests/utils.py	(working tree)
@@ -260,7 +260,7 @@ def extract_zipped_paths(path):
     archive with the location of an extracted copy of the target, or else
     just return the provided path unchanged.
     """
-    if os.path.exists(path):
+    if callable(path) or os.path.exists(path):
         # this is already a valid path, no need to do anything further
         return path