From c35b1e759ad4dda988f2bfc2498296f4a30da9d5 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 18 Jul 2017 16:43:59 -0400 Subject: raise if nonexisting path --- src/leap/common/http.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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( -- cgit v1.2.3