summaryrefslogtreecommitdiff
path: root/src/leap/gui
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-06 17:20:54 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-06 17:20:54 -0300
commit8f57fbc04d2fa224a5a3fb4560da7ef9b91c202c (patch)
tree02dce93d0072287e01cb73d6d4fce1680c68be94 /src/leap/gui
parentd6bf9b3e11ff87488a5f508acebf8f20ad026166 (diff)
parentd5ea34c797e56b05fc54a186cf6c998e036f4ed0 (diff)
Merge remote-tracking branch 'ivan/feature/3310_add-support-for-multiple-schemas' into develop
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 87dd4f5c..39160db9 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -1222,29 +1222,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):
"""