Commit 5b266ad3 authored by Yann Leboulanger's avatar Yann Leboulanger

if config file says password is saved with libsecret (with py3 branch) we can...

if config file says password is saved with libsecret (with py3 branch) we can still get it with gnomekeyring
parent 1ad5b6fc
......@@ -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 == '<kwallet>'):
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
return None
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment