From 73e6edd3ed330892feba5cc596cf5a7d0738d4cf Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 5 Nov 2016 15:04:39 +0000 Subject: [PATCH] Move previously-dead code in passwords. --- src/common/passwords.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/passwords.py b/src/common/passwords.py index 6dfe69609..d7a926aa2 100644 --- a/src/common/passwords.py +++ b/src/common/passwords.py @@ -119,13 +119,11 @@ class GnomePasswordStorage(PasswordStorage): if len(items) > 1: warnings.warn("multiple gnome keyring items found for account %s;" " trying to use the first one..." % account_name) - if items: - return items[0].secret - else: - return None if err == GnomeKeyring.Result.NO_KEYRING_DAEMON: ## no keyring daemon: in the future, stop using it set_storage(SimplePasswordStorage()) + if items: + return items[0].secret return None def save_password(self, account_name, password, update=True):