Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lesson Template
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
prace-lessons
Lesson Template
Commits
a733e2a3
Commit
a733e2a3
authored
8 years ago
by
Greg Wilson
Browse files
Options
Downloads
Patches
Plain Diff
Raising exception instead of printing error on bad YAML
parent
10443956
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/util.py
+1
-2
1 addition, 2 deletions
bin/util.py
with
1 addition
and
2 deletions
bin/util.py
+
1
−
2
View file @
a733e2a3
...
...
@@ -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
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment