Verified Commit 7d68c50f authored by André's avatar André
Browse files

KEYRING_AVAILABLE: Only depend on selected backend

Passwords can only be stored if the selected backend is recommended.
parent b395ca61
......@@ -37,8 +37,7 @@
keyring_backend = keyring.get_keyring()
log.info('Select %s backend', keyring_backend)
KEYRING_AVAILABLE = any(keyring.core.recommended(backend)
for backend in backends)
KEYRING_AVAILABLE = keyring.core.recommended(keyring_backend)
class SecretPasswordStorage:
......
......@@ -149,9 +149,8 @@ def _get_features(self):
@staticmethod
def _some_keyring_available():
import keyring
backends = keyring.backend.get_all_keyring()
return any(keyring.core.recommended(backend) for backend in backends)
from gajim.common import passwords
return passwords.KEYRING_AVAILABLE
@staticmethod
def _idle_available():
......
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