summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-05-22 12:04:42 -0300
committerTomás Touceda <chiiph@leap.se>2013-05-22 12:04:42 -0300
commitb2d5983d83e35a0766c79134e47b71a4c82d9680 (patch)
tree3d279ecf57bab16c71156848ee8c7eba3c07a827 /src/leap
parentfd4e5894201bff63253e969765908edb997c249a (diff)
parent8c54836c146ac1870996b0d00e116332b9b3d0a5 (diff)
Merge remote-tracking branch 'ivan/bug/keyring-crash-on-wrong-password' into develop
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/gui/mainwindow.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index d51ec3c8..3e8a1c83 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -370,15 +370,22 @@ class MainWindow(QtGui.QMainWindow):
self.ui.chkRemember.setChecked(True)
self.ui.chkAutoLogin.setEnabled(self.ui.chkRemember
.isEnabled())
- saved_password = keyring.get_password(self.KEYRING_KEY,
- saved_user
- .encode("utf8"))
+
+ saved_password = None
+ try:
+ saved_password = keyring.get_password(self.KEYRING_KEY,
+ saved_user
+ .encode("utf8"))
+ except ValueError, e:
+ logger.debug("Incorrect Password. %r." % (e,))
+
if saved_password is not None:
self.ui.lnPassword.setText(saved_password.decode("utf8"))
# Only automatically login if there is a saved user
+ # and the password was retrieved right
self.ui.chkAutoLogin.setChecked(auto_login)
- if auto_login:
+ if auto_login and saved_password:
self._login()
def _show_systray(self):