Skip to content
Snippets Groups Projects
Commit e92865d7 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

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 0e6898b8
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,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
......@@ -73,7 +73,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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment