summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/eip/eipbootstrapper.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-05-19 16:06:42 -0500
committerKali Kaneko <kali@leap.se>2014-05-19 16:06:42 -0500
commitc1dda076d632cc636a18dfa66ed7e70eb36ebe2b (patch)
treeab5cf17b1a4149f275389aa22afe4ece5ac88236 /src/leap/bitmask/services/eip/eipbootstrapper.py
parentfe0e0ab0f983425228ae8631927505c790464d4b (diff)
parent4c550c558dcb554b3ea1bc0246492e39e8532886 (diff)
Merge tag '0.5.1' into deb-0.5.1
Tag leap.bitmask version 0.5.1 Conflicts: pkg/requirements.pip
Diffstat (limited to 'src/leap/bitmask/services/eip/eipbootstrapper.py')
-rw-r--r--src/leap/bitmask/services/eip/eipbootstrapper.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/leap/bitmask/services/eip/eipbootstrapper.py b/src/leap/bitmask/services/eip/eipbootstrapper.py
index 5a238a1c..c77977ce 100644
--- a/src/leap/bitmask/services/eip/eipbootstrapper.py
+++ b/src/leap/bitmask/services/eip/eipbootstrapper.py
@@ -20,8 +20,6 @@ EIP bootstrapping
import logging
import os
-from PySide import QtCore
-
from leap.bitmask.config.providerconfig import ProviderConfig
from leap.bitmask.crypto.certs import download_client_cert
from leap.bitmask.services import download_service_config
@@ -41,17 +39,21 @@ class EIPBootstrapper(AbstractBootstrapper):
If a check fails, the subsequent checks are not executed
"""
- # All dicts returned are of the form
- # {"passed": bool, "error": str}
- download_config = QtCore.Signal(dict)
- download_client_certificate = QtCore.Signal(dict)
+ def __init__(self, signaler=None):
+ """
+ Constructor for the EIP bootstrapper object
- def __init__(self):
- AbstractBootstrapper.__init__(self)
+ :param signaler: Signaler object used to receive notifications
+ from the backend
+ :type signaler: Signaler
+ """
+ AbstractBootstrapper.__init__(self, signaler)
self._provider_config = None
self._eip_config = None
self._download_if_needed = False
+ if signaler is not None:
+ self._cancel_signal = signaler.EIP_CANCELLED_SETUP
def _download_config(self, *args):
"""
@@ -114,9 +116,9 @@ class EIPBootstrapper(AbstractBootstrapper):
self._download_if_needed = download_if_needed
cb_chain = [
- (self._download_config, self.download_config),
+ (self._download_config, self._signaler.EIP_CONFIG_READY),
(self._download_client_certificates,
- self.download_client_certificate)
+ self._signaler.EIP_CLIENT_CERTIFICATE_READY)
]
return self.addCallbackChain(cb_chain)