Skip to content
Snippets Groups Projects
Commit a733e2a3 authored by Greg Wilson's avatar Greg Wilson
Browse files

Raising exception instead of printing error on bad YAML

parent 10443956
Branches
Tags
No related merge requests found
......@@ -68,8 +68,7 @@ def read_markdown(parser, path):
try:
metadata = yaml.load(pieces[1])
except yaml.YAMLError as e:
print('Unable to parse YAML header in {0}:\n{1}'.format(path, e))
sys.exit(1)
raise ValueError('Unable to parse YAML header in {0}:\n{1}'.format(path, e))
metadata_len = pieces[1].count('\n')
body = pieces[2]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment