mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-02 06:56:12 +02:00
Speed up jrnl by 10%, improve slow imports (#959)
* Improve slow imports * Fix codestyle * fix twice version validation * Fix a syntax mistake
This commit is contained in:
parent
ef5f0a8331
commit
63df95f2ea
5 changed files with 47 additions and 32 deletions
|
@ -27,7 +27,6 @@ import sys
|
|||
import jrnl
|
||||
|
||||
from . import install, plugins, util
|
||||
from .EncryptedJournal import EncryptedJournal
|
||||
from .Journal import PlainJournal, open_journal
|
||||
from .util import ERROR_COLOR, RESET_COLOR, UserAbort
|
||||
|
||||
|
@ -245,6 +244,8 @@ def guess_mode(args, config):
|
|||
|
||||
def encrypt(journal, filename=None):
|
||||
""" Encrypt into new file. If filename is not set, we encrypt the journal file itself. """
|
||||
from .EncryptedJournal import EncryptedJournal
|
||||
|
||||
journal.config["encrypt"] = True
|
||||
|
||||
new_journal = EncryptedJournal.from_journal(journal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue