summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-07-18 16:43:59 -0400
committerRuben Pollan <meskio@sindominio.net>2017-07-18 22:47:03 +0200
commitc35b1e759ad4dda988f2bfc2498296f4a30da9d5 (patch)
tree1aa67808b75847440768b34a229feaebfbc82f73
parent754637427f9a49e9f8989e86a106f3e5f7cddecb (diff)
raise if nonexisting path
-rw-r--r--src/leap/common/http.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/common/http.py b/src/leap/common/http.py
index d0a298c..dd1b0f9 100644
--- a/src/leap/common/http.py
+++ b/src/leap/common/http.py
@@ -216,13 +216,15 @@ class HTTPClient(object):
ignored.
:type timeout: float
"""
-
self._timeout = timeout
self._pool = pool if pool is not None else self._pool
if cert_path is None:
trustRoot = getCertifiTrustRoot()
else:
+ if not os.path.isfile(cert_path):
+ raise RuntimeError(
+ 'Certificate file %s cannot be found' % cert_path)
trustRoot = cert_path
self._agent = Agent(