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:
wotgl 2020-05-28 00:11:40 +03:00 committed by GitHub
parent ef5f0a8331
commit 63df95f2ea
5 changed files with 47 additions and 32 deletions

View file

@ -34,12 +34,7 @@ def check_exists(path):
return os.path.exists(path)
def upgrade_jrnl_if_necessary(config_path):
with open(config_path, "r", encoding="utf-8") as f:
config_file = f.read()
if not config_file.strip().startswith("{"):
return
def upgrade_jrnl(config_path):
config = util.load_config(config_path)
print(