summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-07-03 14:39:10 -0300
committerIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-07-05 16:54:33 -0300
commit24a997667abfa0f4f414c2206236be44a09094ef (patch)
tree0db4f34e584e46174d4a2c6c7b18a7a215ff4508
parentb5516cc47b887d989690bde102441726927b84f1 (diff)
Bugfix: faulty multiple provider selection.
Closes #3067.
-rw-r--r--changes/bug-3067_faulty-multiple-provider-selection1
-rw-r--r--src/leap/gui/mainwindow.py15
2 files changed, 11 insertions, 5 deletions
diff --git a/changes/bug-3067_faulty-multiple-provider-selection b/changes/bug-3067_faulty-multiple-provider-selection
new file mode 100644
index 00000000..fef95a6e
--- /dev/null
+++ b/changes/bug-3067_faulty-multiple-provider-selection
@@ -0,0 +1 @@
+ o Bugfix: reload config if switching to a different provider. Closes #3067.
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 5e7965dd..7180139a 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -698,11 +698,16 @@ class MainWindow(QtGui.QMainWindow):
"""
if data[self._provider_bootstrapper.PASSED_KEY]:
provider = self._login_widget.get_selected_provider()
- if self._provider_config.loaded() or \
- self._provider_config.load(os.path.join("leap",
- "providers",
- provider,
- "provider.json")):
+
+ # If there's no loaded provider or
+ # we want to connect to other provider...
+ if (not self._provider_config.loaded() or
+ self._provider_config.get_domain() != provider):
+ self._provider_config.load(
+ os.path.join("leap", "providers",
+ provider, "provider.json"))
+
+ if self._provider_config.loaded():
self._provider_bootstrapper.run_provider_setup_checks(
self._provider_config,
download_if_needed=True)