mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Open config_path as utf-8
This commit is contained in:
parent
9f7d71aa8f
commit
04082d36c9
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ from . import util
|
||||||
from .EncryptedJournal import EncryptedJournal
|
from .EncryptedJournal import EncryptedJournal
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import codecs
|
||||||
|
|
||||||
|
|
||||||
def backup(filename, binary=False):
|
def backup(filename, binary=False):
|
||||||
|
@ -18,7 +19,7 @@ def backup(filename, binary=False):
|
||||||
|
|
||||||
|
|
||||||
def upgrade_jrnl_if_necessary(config_path):
|
def upgrade_jrnl_if_necessary(config_path):
|
||||||
with open(config_path) as f:
|
with codecs.open(config_path, "r", "utf-8") as f:
|
||||||
config_file = f.read()
|
config_file = f.read()
|
||||||
if not config_file.strip().startswith("{"):
|
if not config_file.strip().startswith("{"):
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue