summaryrefslogtreecommitdiff
path: root/src/leap/gui/mainwindow.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-06-23 23:53:13 +0900
committerKali Kaneko <kali@leap.se>2013-06-23 23:53:13 +0900
commit53668de6f4ced844b10fc34fbc5ba77b00d54825 (patch)
tree3d6be7573fcef2538aa59101250aff28a4921dbd /src/leap/gui/mainwindow.py
parentb777dbfd4df7f4f0e4c2596fcc4000c2aba05a08 (diff)
parent440f2036e36985e9536644b28af0e62cea8704eb (diff)
Merge remote-tracking branch 'chiiph/bug/disable_bad_keyring' into develop
Diffstat (limited to 'src/leap/gui/mainwindow.py')
-rw-r--r--src/leap/gui/mainwindow.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 2ed01917..9dc1e006 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -55,6 +55,7 @@ from leap.services.eip.vpnlaunchers import (VPNLauncherException,
EIPNoPkexecAvailable,
EIPNoPolkitAuthAgentAvailable)
from leap.util import __version__ as VERSION
+from leap.util.keyring_helpers import has_keyring
from leap.services.mail.smtpconfig import SMTPConfig
@@ -435,7 +436,7 @@ class MainWindow(QtGui.QMainWindow):
self._login_widget.set_user(possible_username)
if possible_password is not None:
self._login_widget.set_password(possible_password)
- self._login_widget.set_remember(True)
+ self._login_widget.set_remember(has_keyring())
self._login()
self._wizard = None
self._settings.set_properprovider(True)
@@ -454,7 +455,7 @@ class MainWindow(QtGui.QMainWindow):
logger.error('Username@provider malformed. %r' % (e, ))
saved_user = None
- if saved_user is not None:
+ if saved_user is not None and has_keyring():
# fill the username
self._login_widget.set_user(username)
@@ -740,7 +741,7 @@ class MainWindow(QtGui.QMainWindow):
self._login_widget.set_status(self.tr("Logging in..."), error=False)
self._login_widget.set_enabled(False)
- if self._login_widget.get_remember():
+ if self._login_widget.get_remember() and has_keyring():
# in the keyring and in the settings
# we store the value 'usename@provider'
username_domain = (username + '@' + provider).encode("utf8")