mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
fix keyring problems
This commit is contained in:
parent
b6d1ecc0af
commit
d74dd3bb6f
1 changed files with 5 additions and 3 deletions
|
@ -61,8 +61,7 @@ def create_password(
|
|||
if yesno("Do you want to store the password in your keychain?", default=True):
|
||||
set_keychain(journal_name, pw)
|
||||
else:
|
||||
set_keychain(journal_name, None)
|
||||
|
||||
pass
|
||||
return pw
|
||||
|
||||
|
||||
|
@ -108,7 +107,10 @@ def set_keychain(journal_name, password):
|
|||
except keyring.errors.PasswordDeleteError:
|
||||
pass
|
||||
else:
|
||||
keyring.set_password("jrnl", journal_name, password)
|
||||
try:
|
||||
keyring.set_password("jrnl", journal_name, password)
|
||||
except keyring.errors.NoKeyringError:
|
||||
print("Keyring backend not found. Please install one of the supported backends by visiting: https://pypi.org/project/keyring/")
|
||||
|
||||
|
||||
def yesno(prompt, default=True):
|
||||
|
|
Loading…
Add table
Reference in a new issue