Move previously-dead code in passwords.

This commit is contained in:
Emmanuel Gil Peyrot 2016-11-05 15:04:39 +00:00
parent 0bdd592e4d
commit 73e6edd3ed
1 changed files with 2 additions and 4 deletions

View File

@ -119,13 +119,11 @@ class GnomePasswordStorage(PasswordStorage):
if len(items) > 1: if len(items) > 1:
warnings.warn("multiple gnome keyring items found for account %s;" warnings.warn("multiple gnome keyring items found for account %s;"
" trying to use the first one..." % account_name) " trying to use the first one..." % account_name)
if items:
return items[0].secret
else:
return None
if err == GnomeKeyring.Result.NO_KEYRING_DAEMON: if err == GnomeKeyring.Result.NO_KEYRING_DAEMON:
## no keyring daemon: in the future, stop using it ## no keyring daemon: in the future, stop using it
set_storage(SimplePasswordStorage()) set_storage(SimplePasswordStorage())
if items:
return items[0].secret
return None return None
def save_password(self, account_name, password, update=True): def save_password(self, account_name, password, update=True):