Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-09-19 23:04:39 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-09-19 23:04:39 +0300
commit267dd73fcb53b8b604c8e8dbe9e4f6627f72448c (patch)
tree687f5583d59d60f270e762b7c648422c38f6b613
parent84060484c44aceeff32ef6aa715374de215d7c1a (diff)
Catch LibSecret errors
-rw-r--r--gajim/common/passwords.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/gajim/common/passwords.py b/gajim/common/passwords.py
index 8f305f2ee..f86ef8dd6 100644
--- a/gajim/common/passwords.py
+++ b/gajim/common/passwords.py
@@ -80,8 +80,13 @@ class LibSecretPasswordStorage(PasswordStorage):
user = app.config.get_per('accounts', account_name, 'name')
display_name = _('XMPP account %s') % user + '@' + server
attributes = {'user': user, 'server': server, 'protocol': 'xmpp'}
- return self.Secret.password_store_sync(self.GAJIM_SCHEMA, attributes,
- self.Secret.COLLECTION_DEFAULT, display_name, password or '', None)
+ try:
+ return self.Secret.password_store_sync(
+ self.GAJIM_SCHEMA, attributes, self.Secret.COLLECTION_DEFAULT,
+ display_name, password or '', None)
+ except GLib.Error as error:
+ log.error(error)
+ return False
class SecretWindowsPasswordStorage(PasswordStorage):