Commit 75e8c899 authored by Aris Angelogiannopoulos's avatar Aris Angelogiannopoulos
Browse files

Specify the certificate directory for the requests module

parent 7d39f24e
Pipeline #421061 passed with stage
in 6 minutes and 52 seconds
......@@ -145,7 +145,7 @@ class Context(object):
raise BadEndpoint("%s (%s)" % (self.endpoint, str(e))), None, sys.exc_info()[2]
return endpoint_info
def __init__(self, endpoint, ucert=None, ukey=None, verify=True, access_token=None, no_creds=False, capath=None,
def __init__(self, endpoint, ucert=None, ukey=None, verify=True, access_token=None, no_creds=False, capath='/etc/grid-security/certificates',
request_class=Request, connectTimeout=30, timeout=30):
self.passwd = None
......@@ -159,7 +159,11 @@ class Context(object):
self.ukey = None
else:
self._set_x509(ucert, ukey)
if request_class == Request:
verify = capath
capath = None
self._requester = request_class(
self.ucert, self.ukey, passwd=self.passwd, verify=verify, access_token=self.access_token, capath=capath,
connectTimeout=connectTimeout, timeout=timeout)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment