mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-13 18:08:30 +02:00
rename function, fix some linting issues
This commit is contained in:
parent
c52dcfef5a
commit
bb1f263d6c
3 changed files with 6 additions and 6 deletions
|
@ -5,12 +5,11 @@ import datetime
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from types import ModuleType
|
|
||||||
|
|
||||||
|
from jrnl import EncryptedJournal
|
||||||
from jrnl import Entry
|
from jrnl import Entry
|
||||||
from jrnl import time
|
from jrnl import time
|
||||||
from jrnl.encryption import BaseEncryption
|
from jrnl.encryption import determine_encryption_method
|
||||||
from jrnl.encryption import determine_encryption_type
|
|
||||||
from jrnl.messages import Message
|
from jrnl.messages import Message
|
||||||
from jrnl.messages import MsgStyle
|
from jrnl.messages import MsgStyle
|
||||||
from jrnl.messages import MsgText
|
from jrnl.messages import MsgText
|
||||||
|
@ -82,7 +81,7 @@ class Journal:
|
||||||
self.sort()
|
self.sort()
|
||||||
|
|
||||||
def _get_encryption_method(self):
|
def _get_encryption_method(self):
|
||||||
self._encryption_method = determine_encryption_type(self.config["encrypt"])(
|
self._encryption_method = determine_encryption_method(self.config["encrypt"])(
|
||||||
self.config
|
self.config
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
from jrnl.encryption.NoEncryption import NoEncryption
|
from jrnl.encryption.NoEncryption import NoEncryption
|
||||||
|
|
||||||
|
|
||||||
def determine_encryption_type(config):
|
def determine_encryption_method(config):
|
||||||
encryption_method = NoEncryption
|
encryption_method = NoEncryption
|
||||||
if config is True:
|
if config is True or config == "jrnlv2":
|
||||||
# Default encryption method
|
# Default encryption method
|
||||||
from jrnl.encryption.Jrnlv2Encryption import Jrnlv2Encryption
|
from jrnl.encryption.Jrnlv2Encryption import Jrnlv2Encryption
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from jrnl import Journal
|
from jrnl import Journal
|
||||||
|
from jrnl import PlainJournal
|
||||||
from jrnl import __version__
|
from jrnl import __version__
|
||||||
from jrnl.config import is_config_json
|
from jrnl.config import is_config_json
|
||||||
from jrnl.config import load_config
|
from jrnl.config import load_config
|
||||||
|
|
Loading…
Add table
Reference in a new issue