Fixes ezhov-evgeny#43 - local certificate options ignored

If the webdav_cert_path and webdav_key_path options are set, they
should be passed to the call to requests in Client.execute_request
as the cert parameter.
This commit is contained in:
Alex Jordan 2020-04-06 08:39:51 -04:00 committed by Evgeny Ezhov
parent 39afefffc5
commit a3c75b7155

View file

@ -217,6 +217,7 @@ class Client(object):
auth=(self.webdav.login, self.webdav.password) if (not self.webdav.token and not self.session.auth) else None, auth=(self.webdav.login, self.webdav.password) if (not self.webdav.token and not self.session.auth) else None,
headers=self.get_headers(action, headers_ext), headers=self.get_headers(action, headers_ext),
timeout=self.timeout, timeout=self.timeout,
cert=(self.webdav.cert_path, self.webdav.key_path) if (self.webdav.cert_path and self.webdav.key_path) else None,
data=data, data=data,
stream=True, stream=True,
verify=self.verify verify=self.verify