summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-05-29 10:40:34 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-05-29 10:40:34 -0300
commit1b467b53ec99352280d098bea78cf1dceffef2d5 (patch)
tree3a5f7d8c1573e65e7f89c8e2b5bc2dc16bd8d789 /src
parentc4c6225f4b7950c6a83e5648157d7fd4eccd7d3e (diff)
Avoid 'provides eip' check during eip autostart.
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index cf6614be..fd9a70ac 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -1578,7 +1578,7 @@ class MainWindow(QtGui.QMainWindow):
default_provider)
if settings.get_autostart_eip():
- self._maybe_start_eip()
+ self._maybe_start_eip(autostart=True)
@QtCore.Slot()
def _start_EIP(self):
@@ -1787,12 +1787,21 @@ class MainWindow(QtGui.QMainWindow):
# eip boostrapping, config etc...
- def _maybe_start_eip(self):
+ def _maybe_start_eip(self, autostart=False):
"""
Start the EIP bootstrapping sequence if the client is configured to
do so.
+
+ :param autostart: we are autostarting EIP when this is True
+ :type autostart: bool
"""
- if self._provides_eip_and_enabled() and not self._already_started_eip:
+ # during autostart we assume that the provider provides EIP
+ if autostart:
+ should_start = EIP_SERVICE in self._enabled_services
+ else:
+ should_start = self._provides_eip_and_enabled()
+
+ if should_start and not self._already_started_eip:
# XXX this should be handled by the state machine.
self._eip_status.set_eip_status(
self.tr("Starting..."))