diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-08-05 12:12:03 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-08-05 12:12:03 -0300 |
commit | 1170527c76d493858097ae58824b6e8f23c21a4c (patch) | |
tree | 0628186f647dc3b755c6675ab6604138fdc3c470 /src/leap/gui | |
parent | bb01912dd4dfe05f16d1c2fa716346ca358f5d04 (diff) | |
parent | a2e1de38ec45e0531d5edcb4523879b3b63d62f1 (diff) |
Merge remote-tracking branch 'chiiph/bug/improve_displayed_errors' into develop
Diffstat (limited to 'src/leap/gui')
-rw-r--r-- | src/leap/gui/mainwindow.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 8e7e2488..1c1236af 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -745,11 +745,13 @@ class MainWindow(QtGui.QMainWindow): download_if_needed=True) else: self._login_widget.set_status( - self.tr("Could not load provider configuration.")) + self.tr("Unable to login: Problem with provider")) + logger.error("Could not load provider configuration.") self._login_widget.set_enabled(True) else: self._login_widget.set_status( - data[self._provider_bootstrapper.ERROR_KEY]) + self.tr("Unable to login: Problem with provider")) + logger.error(data[self._provider_bootstrapper.ERROR_KEY]) self._login_widget.set_enabled(True) def _login(self): @@ -852,7 +854,8 @@ class MainWindow(QtGui.QMainWindow): self._login_defer = self._srp_auth.authenticate(username, password) else: self._login_widget.set_status( - data[self._provider_bootstrapper.ERROR_KEY]) + "Unable to login: Problem with provider") + logger.error(data[self._provider_bootstrapper.ERROR_KEY]) self._login_widget.set_enabled(True) def _authentication_finished(self, ok, message): @@ -863,7 +866,13 @@ class MainWindow(QtGui.QMainWindow): Once the user is properly authenticated, try starting the EIP service """ + + # In general we want to "filter" likely complicated error + # messages, but in this case, the messages make more sense as + # they come. Since they are "Unknown user" or "Unknown + # password" self._login_widget.set_status(message, error=not ok) + if ok: self._logged_user = self._login_widget.get_user() self.ui.action_log_out.setEnabled(True) @@ -1276,7 +1285,8 @@ class MainWindow(QtGui.QMainWindow): self._login_widget.set_cancel(False) self._login_widget.set_enabled(True) self._login_widget.set_status( - data[self._provider_bootstrapper.ERROR_KEY]) + self.tr("Unable to connect: Problem with provider")) + logger.error(data[self._provider_bootstrapper.ERROR_KEY]) def _eip_intermediate_stage(self, data): """ @@ -1291,7 +1301,8 @@ class MainWindow(QtGui.QMainWindow): passed = data[self._provider_bootstrapper.PASSED_KEY] if not passed: self._login_widget.set_status( - data[self._provider_bootstrapper.ERROR_KEY]) + self.tr("Unable to connect: Problem with provider")) + logger.error(data[self._provider_bootstrapper.ERROR_KEY]) self._already_started_eip = False def _eip_finished(self, exitCode): |