mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58: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):
|
||||
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):
|
||||
|
|
Loading…
Add table
Reference in a new issue