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

[gjc] workaround gnome-keyring-daemon bug. see #2595

parent dba0a34a
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ class PasswordStorage(object):
raise NotImplementedError
def save_password(self, account_name, password):
raise NotImplementedError
class SimplePasswordStorage(PasswordStorage):
def get_password(self, account_name):
......@@ -45,8 +45,16 @@ class SimplePasswordStorage(PasswordStorage):
class GnomePasswordStorage(PasswordStorage):
def __init__(self):
self.keyring = gnomekeyring.get_default_keyring_sync()
def __init__(self):
# self.keyring = gnomekeyring.get_default_keyring_sync()
## above line commented and code below inserted as workaround
## for the bug http://bugzilla.gnome.org/show_bug.cgi?id=363019
self.keyring = "default"
try:
gnomekeyring.create_sync(self.keyring, None)
except gnomekeyring.AlreadyExistsError:
pass
def get_password(self, account_name):
conf = gajim.config.get_per('accounts', account_name, 'password')
......@@ -73,7 +81,7 @@ class GnomePasswordStorage(PasswordStorage):
## no keyring daemon: in the future, stop using it
set_storage(SimplePasswordStorage())
return None
def save_password(self, account_name, password, update=True):
display_name = _('Gajim account %s') % account_name
attributes = dict(account_name=str(account_name), gajim=1)
......
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