From 09f1399db76a5c64cc38d45510b18cecd3a3d457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 13 Jun 2013 10:49:21 -0300 Subject: If eip fails to autostart, mark it as such --- src/leap/gui/mainwindow.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/leap') 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 -- cgit v1.2.3