mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
parent
101aeaabb5
commit
bcfd2d4b43
3 changed files with 3 additions and 3 deletions
|
@ -225,7 +225,7 @@ def check_journal_content(context, text, journal_name="default"):
|
||||||
@then('journal "{journal_name}" should not exist')
|
@then('journal "{journal_name}" should not exist')
|
||||||
def journal_doesnt_exist(context, journal_name="default"):
|
def journal_doesnt_exist(context, journal_name="default"):
|
||||||
with open(install.CONFIG_FILE_PATH) as config_file:
|
with open(install.CONFIG_FILE_PATH) as config_file:
|
||||||
config = yaml.load(config_file)
|
config = yaml.load(config_file, Loader=yaml.FullLoader)
|
||||||
journal_path = config['journals'][journal_name]
|
journal_path = config['journals'][journal_name]
|
||||||
assert not os.path.exists(journal_path)
|
assert not os.path.exists(journal_path)
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Template(object):
|
||||||
def from_file(cls, filename):
|
def from_file(cls, filename):
|
||||||
with open(filename) as f:
|
with open(filename) as f:
|
||||||
front_matter, body = f.read().strip("-\n").split("---", 2)
|
front_matter, body = f.read().strip("-\n").split("---", 2)
|
||||||
front_matter = yaml.load(front_matter)
|
front_matter = yaml.load(front_matter, Loader=yaml.FullLoader)
|
||||||
template = cls(body)
|
template = cls(body)
|
||||||
template.__dict__.update(front_matter)
|
template.__dict__.update(front_matter)
|
||||||
return template
|
return template
|
||||||
|
|
|
@ -141,7 +141,7 @@ def load_config(config_path):
|
||||||
"""Tries to load a config file from YAML.
|
"""Tries to load a config file from YAML.
|
||||||
"""
|
"""
|
||||||
with open(config_path) as f:
|
with open(config_path) as f:
|
||||||
return yaml.load(f)
|
return yaml.load(f, Loader=yaml.FullLoader)
|
||||||
|
|
||||||
|
|
||||||
def scope_config(config, journal_name):
|
def scope_config(config, journal_name):
|
||||||
|
|
Loading…
Add table
Reference in a new issue