diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-07-05 12:50:10 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-07-05 12:50:10 -0300 |
commit | 17f608f0148c2340a811d6eb85bebd2e612f10be (patch) | |
tree | fa453b235ea38c8157e7e1ec4e61e3c000e196fb /src/leap/services/eip/eipbootstrapper.py | |
parent | 57184883c7aa30475d37681d6b88ff0c699e1c7b (diff) |
Set global request timeout to REQUEST_TIMEOUT (10 secs)
Diffstat (limited to 'src/leap/services/eip/eipbootstrapper.py')
-rw-r--r-- | src/leap/services/eip/eipbootstrapper.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/services/eip/eipbootstrapper.py b/src/leap/services/eip/eipbootstrapper.py index b2af0aea..60270b5b 100644 --- a/src/leap/services/eip/eipbootstrapper.py +++ b/src/leap/services/eip/eipbootstrapper.py @@ -31,6 +31,7 @@ from leap.config.providerconfig import ProviderConfig from leap.crypto.srpauth import SRPAuth from leap.services.eip.eipconfig import EIPConfig from leap.util.request_helpers import get_content +from leap.util.constants import REQUEST_TIMEOUT from leap.services.abstractbootstrapper import AbstractBootstrapper logger = logging.getLogger(__name__) @@ -89,7 +90,8 @@ class EIPBootstrapper(AbstractBootstrapper): res = self._session.get(config_uri, verify=self._provider_config .get_ca_cert_path(), - headers=headers) + headers=headers, + timeout=REQUEST_TIMEOUT) res.raise_for_status() # Not modified @@ -139,7 +141,8 @@ class EIPBootstrapper(AbstractBootstrapper): res = self._session.get(cert_uri, verify=self._provider_config .get_ca_cert_path(), - cookies=cookies) + cookies=cookies, + timeout=REQUEST_TIMEOUT) res.raise_for_status() client_cert = res.content |