rename function, fix some linting issues

This commit is contained in:
Jonathan Wren 2022-09-24 06:11:04 -07:00
parent c52dcfef5a
commit bb1f263d6c
3 changed files with 6 additions and 6 deletions

View file

@ -5,12 +5,11 @@ import datetime
import logging
import os
import re
from types import ModuleType
from jrnl import EncryptedJournal
from jrnl import Entry
from jrnl import time
from jrnl.encryption import BaseEncryption
from jrnl.encryption import determine_encryption_type
from jrnl.encryption import determine_encryption_method
from jrnl.messages import Message
from jrnl.messages import MsgStyle
from jrnl.messages import MsgText
@ -82,7 +81,7 @@ class Journal:
self.sort()
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
)

View file

@ -3,9 +3,9 @@
from jrnl.encryption.NoEncryption import NoEncryption
def determine_encryption_type(config):
def determine_encryption_method(config):
encryption_method = NoEncryption
if config is True:
if config is True or config == "jrnlv2":
# Default encryption method
from jrnl.encryption.Jrnlv2Encryption import Jrnlv2Encryption

View file

@ -4,6 +4,7 @@
import os
from jrnl import Journal
from jrnl import PlainJournal
from jrnl import __version__
from jrnl.config import is_config_json
from jrnl.config import load_config