chg: dev: ca_certs for get_PoolManager
This commit is contained in:
parent
367cf1c6eb
commit
45beb6bdfb
6
buku
6
buku
@ -3393,17 +3393,17 @@ def get_PoolManager():
|
|||||||
ProxyManager or PoolManager
|
ProxyManager or PoolManager
|
||||||
ProxyManager if https_proxy is defined, PoolManager otherwise.
|
ProxyManager if https_proxy is defined, PoolManager otherwise.
|
||||||
"""
|
"""
|
||||||
|
ca_certs = os.getenv('BUKU_CA_CERTS', default=certifi.where())
|
||||||
if MYPROXY:
|
if MYPROXY:
|
||||||
return urllib3.ProxyManager(MYPROXY, num_pools=1, headers=MYHEADERS, timeout=15,
|
return urllib3.ProxyManager(MYPROXY, num_pools=1, headers=MYHEADERS, timeout=15,
|
||||||
cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
|
cert_reqs='CERT_REQUIRED', ca_certs=ca_certs)
|
||||||
|
|
||||||
return urllib3.PoolManager(
|
return urllib3.PoolManager(
|
||||||
num_pools=1,
|
num_pools=1,
|
||||||
headers=MYHEADERS,
|
headers=MYHEADERS,
|
||||||
timeout=15,
|
timeout=15,
|
||||||
cert_reqs='CERT_REQUIRED',
|
cert_reqs='CERT_REQUIRED',
|
||||||
ca_certs=certifi.where())
|
ca_certs=ca_certs)
|
||||||
|
|
||||||
|
|
||||||
def network_handler(url, http_head=False):
|
def network_handler(url, http_head=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user