summaryrefslogtreecommitdiff
path: root/src/leap/gui
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-08-06 11:10:56 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-08-06 17:13:56 -0300
commit5cb5b9e1af04866000b332e4abbbbdbb052ba455 (patch)
treeff73e62f6d96f1b0090a53e3215558fd0fd54e59 /src/leap/gui
parent1d8588051a4e1a1e9f24653fd3edec4569aed153 (diff)
Update code to use the new EIP schema selection.
Diffstat (limited to 'src/leap/gui')
-rw-r--r--src/leap/gui/mainwindow.py39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 89790239..d1f3e805 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -1221,29 +1221,34 @@ class MainWindow(QtGui.QMainWindow):
loaded
"""
leap_assert(self._eip_config, "We need an eip config!")
+ passed = data[self._eip_bootstrapper.PASSED_KEY]
+
+ if not passed:
+ error_msg = self.tr("There was a problem with the provider")
+ self._status_panel.set_eip_status(error_msg, error=True)
+ logger.error(data[self._eip_bootstrapper.ERROR_KEY])
+ self._already_started_eip = False
+ return
provider_config = self._get_best_provider_config()
domain = provider_config.get_domain()
- if data[self._eip_bootstrapper.PASSED_KEY] and \
- (self._eip_config.loaded() or
- self._eip_config.load(os.path.join("leap",
- "providers",
- domain,
- "eip-service.json"))):
- self._start_eip()
+ loaded = self._eip_config.loaded()
+ if not loaded:
+ eip_config_path = os.path.join("leap", "providers",
+ domain, "eip-service.json")
+ api_version = provider_config.get_api_version()
+ self._eip_config.set_api_version(api_version)
+ loaded = self._eip_config.load(eip_config_path)
+
+ if loaded:
+ self._start_eip()
else:
- if data[self._eip_bootstrapper.PASSED_KEY]:
- self._status_panel.set_eip_status(
- self.tr("Could not load Encrypted Internet "
- "Configuration."),
- error=True)
- else:
- self._status_panel.set_eip_status(
- data[self._eip_bootstrapper.ERROR_KEY],
- error=True)
- self._already_started_eip = False
+ self._status_panel.set_eip_status(
+ self.tr("Could not load Encrypted Internet "
+ "Configuration."),
+ error=True)
def _logout(self):
"""