if config file says password is saved with libsecret (with py3 branch) we can still get it with gnomekeyring

This commit is contained in:
Yann Leboulanger 2015-07-24 21:53:58 +02:00
parent 1ad5b6fcd9
commit 5b266ad30c
1 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ 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 \
if passwd and (passwd.startswith('gnomekeyring:') or passwd.startswith('libsecret:') or \
passwd == '<kwallet>'):
# this is not a real password, it's either a gnome
# keyring token or stored in the KDE wallet
@ -79,7 +79,7 @@ class GnomePasswordStorage(PasswordStorage):
conf = gajim.config.get_per('accounts', account_name, 'password')
if conf is None or conf == '<kwallet>':
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: