diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-06-13 10:49:21 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-06-13 10:49:21 -0300 |
commit | 09f1399db76a5c64cc38d45510b18cecd3a3d457 (patch) | |
tree | 3bfe17284871c5b0c696e04091c81632823b3e01 /src | |
parent | f35506e9b93cf0182af37ccdcc36e343b44b882c (diff) |
If eip fails to autostart, mark it as such
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/gui/mainwindow.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 65f5fe3d..752f5ef1 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -186,7 +186,7 @@ class MainWindow(QtGui.QMainWindow): self._eip_bootstrapper = EIPBootstrapper() self._eip_bootstrapper.download_config.connect( - self._intermediate_stage) + self._eip_intermediate_stage) self._eip_bootstrapper.download_client_certificate.connect( self._finish_eip_bootstrap) @@ -1140,6 +1140,7 @@ class MainWindow(QtGui.QMainWindow): else: self._set_eip_status(data[self._eip_bootstrapper.ERROR_KEY], error=True) + self._already_started_eip = False def _logout(self): """ @@ -1184,6 +1185,21 @@ class MainWindow(QtGui.QMainWindow): self._login_set_enabled(True) self._set_status(data[self._provider_bootstrapper.ERROR_KEY]) + def _eip_intermediate_stage(self, data): + """ + SLOT + TRIGGERS: + self._eip_bootstrapper.download_config + + If there was a problem, displays it, otherwise it does nothing. + This is used for intermediate bootstrapping stages, in case + they fail. + """ + passed = data[self._provider_bootstrapper.PASSED_KEY] + if not passed: + self._set_status(data[self._provider_bootstrapper.ERROR_KEY]) + self._already_started_eip = False + def _eip_finished(self, exitCode): """ SLOT |