diff options
author | Devtools Arcadia <arcadia-devtools@yandex-team.ru> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /contrib/python/requests/patches/01-arcadia.patch | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'contrib/python/requests/patches/01-arcadia.patch')
-rw-r--r-- | contrib/python/requests/patches/01-arcadia.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/python/requests/patches/01-arcadia.patch b/contrib/python/requests/patches/01-arcadia.patch new file mode 100644 index 0000000000..c622d7b578 --- /dev/null +++ b/contrib/python/requests/patches/01-arcadia.patch @@ -0,0 +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 + |