From 5b266ad30c133a3918a6d4432fdb6197b0fa049a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 24 Jul 2015 21:53:58 +0200 Subject: [PATCH] if config file says password is saved with libsecret (with py3 branch) we can still get it with gnomekeyring --- src/common/passwords.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/passwords.py b/src/common/passwords.py index 191766edc..6dfe69609 100644 --- a/src/common/passwords.py +++ b/src/common/passwords.py @@ -49,8 +49,8 @@ class PasswordStorage(object): class SimplePasswordStorage(PasswordStorage): def get_password(self, account_name): passwd = gajim.config.get_per('accounts', account_name, 'password') - if passwd and (passwd.startswith('gnomekeyring:') or \ - passwd == ''): + if passwd and (passwd.startswith('gnomekeyring:') or passwd.startswith('libsecret:') or \ + passwd == ''): # this is not a real password, it's either a gnome # keyring token or stored in the KDE wallet return None @@ -79,7 +79,7 @@ class GnomePasswordStorage(PasswordStorage): conf = gajim.config.get_per('accounts', account_name, 'password') if conf is None or conf == '': return None - if not conf.startswith('gnomekeyring:'): + if not (conf.startswith('gnomekeyring:') or conf.startswith('libsecret')): password = conf ## migrate the password over to keyring try: