Commit acf3c30d authored by Christophe Haen's avatar Christophe Haen
Browse files

Propagate the verify flag down to requests

parent f3ae89df
...@@ -29,7 +29,11 @@ class Request(object): ...@@ -29,7 +29,11 @@ class Request(object):
self.ukey = ukey self.ukey = ukey
self.passwd = passwd self.passwd = passwd
self.access_token = access_token self.access_token = access_token
self.verify = False self.verify = verify
# Disable the warnings
if not verify:
requests.packages.urllib3.disable_warnings()
self.connectTimeout = connectTimeout self.connectTimeout = connectTimeout
self.timeout = timeout self.timeout = timeout
...@@ -83,7 +87,7 @@ class Request(object): ...@@ -83,7 +87,7 @@ class Request(object):
_headers['Authorization'] = 'Bearer ' + self.access_token _headers['Authorization'] = 'Bearer ' + self.access_token
response = self.session.request(method=method, url=str(url), response = self.session.request(method=method, url=str(url),
data=body, headers=_headers, data=body, headers=_headers, verify = self.verify,
timeout=(self.connectTimeout, self.timeout), timeout=(self.connectTimeout, self.timeout),
cert=(self.ucert, self.ukey)) cert=(self.ucert, self.ukey))
......
Supports Markdown
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