Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #584 YAMLLoadWarning #585

Merged
merged 1 commit into from Apr 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/steps/core.py
Expand Up @@ -225,7 +225,7 @@ def check_journal_content(context, text, journal_name="default"):
@then('journal "{journal_name}" should not exist')
def journal_doesnt_exist(context, journal_name="default"):
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]
assert not os.path.exists(journal_path)

Expand Down
2 changes: 1 addition & 1 deletion jrnl/plugins/template.py
Expand Up @@ -23,7 +23,7 @@ def __init__(self, template):
def from_file(cls, filename):
with open(filename) as f:
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.__dict__.update(front_matter)
return template
Expand Down
2 changes: 1 addition & 1 deletion jrnl/util.py
Expand Up @@ -141,7 +141,7 @@ def load_config(config_path):
"""Tries to load a config file from YAML.
"""
with open(config_path) as f:
return yaml.load(f)
return yaml.load(f, Loader=yaml.FullLoader)


def scope_config(config, journal_name):
Expand Down