Skip to content

Commit

Permalink
Raising exception instead of printing error on bad YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Wilson committed Jun 22, 2016
1 parent 1044395 commit a733e2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit a733e2a

Please sign in to comment.