diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-14 12:13:19 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-14 12:13:19 +0300 |
commit | c4f810ee977babcf8bfc5247bfb4a93449c730d6 (patch) | |
tree | 7aa3fed0fbf2209b068d341d5cd0514ea94f1039 /contrib/python/requests/py3/patches/01-arcadia.patch | |
parent | 7d5e58f37cd4848e9a05084f589b2578de2077a3 (diff) | |
download | ydb-c4f810ee977babcf8bfc5247bfb4a93449c730d6.tar.gz |
intermediate changes
ref:b2fca828a7deda9abd3be6b09fa05f30e50c9299
Diffstat (limited to 'contrib/python/requests/py3/patches/01-arcadia.patch')
-rw-r--r-- | contrib/python/requests/py3/patches/01-arcadia.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/python/requests/py3/patches/01-arcadia.patch b/contrib/python/requests/py3/patches/01-arcadia.patch new file mode 100644 index 0000000000..4fabe03bbc --- /dev/null +++ b/contrib/python/requests/py3/patches/01-arcadia.patch @@ -0,0 +1,29 @@ +--- contrib/python/requests/py3/requests/adapters.py (index) ++++ contrib/python/requests/py3/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/py3/requests/utils.py (index) ++++ contrib/python/requests/py3/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 + |