Commit a733e2a3 authored by Greg Wilson's avatar Greg Wilson
Browse files

Raising exception instead of printing error on bad YAML

parent 10443956
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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]