mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
get rid of old exception handling for encrypted journal
This commit is contained in:
parent
0b160aa845
commit
101963bba6
1 changed files with 3 additions and 10 deletions
|
@ -431,13 +431,6 @@ def open_journal(journal_name, config, legacy=False):
|
|||
|
||||
from . import EncryptedJournal
|
||||
|
||||
try:
|
||||
if legacy:
|
||||
return EncryptedJournal.LegacyEncryptedJournal(
|
||||
journal_name, **config
|
||||
).open()
|
||||
return EncryptedJournal.EncryptedJournal(journal_name, **config).open()
|
||||
except KeyboardInterrupt:
|
||||
# Since encrypted journals prompt for a password, it's easy for a user to ctrl+c out
|
||||
print("[Interrupted while opening journal]", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
if legacy:
|
||||
return EncryptedJournal.LegacyEncryptedJournal(journal_name, **config).open()
|
||||
return EncryptedJournal.EncryptedJournal(journal_name, **config).open()
|
||||
|
|
Loading…
Add table
Reference in a new issue