mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
Merge pull request #699 from pspeter/fix-keyring-without-backend
Fix crash when no keyring backend available
This commit is contained in:
commit
5a874eeee7
1 changed files with 4 additions and 1 deletions
|
@ -62,7 +62,10 @@ def get_password(validator, keychain=None, max_attempts=3):
|
||||||
|
|
||||||
def get_keychain(journal_name):
|
def get_keychain(journal_name):
|
||||||
import keyring
|
import keyring
|
||||||
return keyring.get_password('jrnl', journal_name)
|
try:
|
||||||
|
return keyring.get_password('jrnl', journal_name)
|
||||||
|
except RuntimeError:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def set_keychain(journal_name, password):
|
def set_keychain(journal_name, password):
|
||||||
|
|
Loading…
Add table
Reference in a new issue