mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
Deal with locked exceptions elsewhere too
This commit is contained in:
parent
0975e66228
commit
3b83c549ff
1 changed files with 4 additions and 2 deletions
|
@ -186,12 +186,14 @@ def set_keychain(journal_name, password):
|
|||
if password is None:
|
||||
try:
|
||||
keyring.delete_password("jrnl", journal_name)
|
||||
except keyring.errors.PasswordDeleteError:
|
||||
except (keyring.errors.KeyringLocked, keyring.errors.PasswordDeleteError):
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
keyring.set_password("jrnl", journal_name, password)
|
||||
except keyring.errors.NoKeyringError:
|
||||
except (keyring.errors.KeyringLocked):
|
||||
pass
|
||||
except (keyring.errors.NoKeyringError):
|
||||
print(
|
||||
"Keyring backend not found. Please install one of the supported backends by visiting: https://pypi.org/project/keyring/",
|
||||
file=sys.stderr,
|
||||
|
|
Loading…
Add table
Reference in a new issue