aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/requests/patches/01-arcadia.patch
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/requests/patches/01-arcadia.patch
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/requests/patches/01-arcadia.patch')
-rw-r--r--contrib/python/requests/patches/01-arcadia.patch58
1 files changed, 29 insertions, 29 deletions
diff --git a/contrib/python/requests/patches/01-arcadia.patch b/contrib/python/requests/patches/01-arcadia.patch
index f7e8351851..c622d7b578 100644
--- a/contrib/python/requests/patches/01-arcadia.patch
+++ b/contrib/python/requests/patches/01-arcadia.patch
@@ -1,29 +1,29 @@
---- contrib/python/requests/requests/adapters.py (index)
-+++ contrib/python/requests/requests/adapters.py (working tree)
-@@ -224,13 +224,13 @@ class HTTPAdapter(BaseAdapter):
- if not cert_loc:
- cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
-
-- if not cert_loc or not os.path.exists(cert_loc):
-+ if not cert_loc or isinstance(cert_loc, basestring) and not os.path.exists(cert_loc):
- raise IOError("Could not find a suitable TLS CA certificate bundle, "
- "invalid path: {}".format(cert_loc))
-
- conn.cert_reqs = 'CERT_REQUIRED'
-
-- if not os.path.isdir(cert_loc):
-+ if not isinstance(cert_loc, basestring) or not os.path.isdir(cert_loc):
- conn.ca_certs = cert_loc
- else:
- conn.ca_cert_dir = cert_loc
---- contrib/python/requests/requests/utils.py (index)
-+++ contrib/python/requests/requests/utils.py (working tree)
-@@ -246,7 +246,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
-
+--- contrib/python/requests/requests/adapters.py (index)
++++ contrib/python/requests/requests/adapters.py (working tree)
+@@ -224,13 +224,13 @@ class HTTPAdapter(BaseAdapter):
+ if not cert_loc:
+ cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
+
+- if not cert_loc or not os.path.exists(cert_loc):
++ if not cert_loc or isinstance(cert_loc, basestring) and not os.path.exists(cert_loc):
+ raise IOError("Could not find a suitable TLS CA certificate bundle, "
+ "invalid path: {}".format(cert_loc))
+
+ conn.cert_reqs = 'CERT_REQUIRED'
+
+- if not os.path.isdir(cert_loc):
++ if not isinstance(cert_loc, basestring) or not os.path.isdir(cert_loc):
+ conn.ca_certs = cert_loc
+ else:
+ conn.ca_cert_dir = cert_loc
+--- contrib/python/requests/requests/utils.py (index)
++++ contrib/python/requests/requests/utils.py (working tree)
+@@ -246,7 +246,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
+