Merge "Improve errors from update-test-platforms"
This commit is contained in:
commit
2efb34d589
@ -20,6 +20,7 @@
|
|||||||
# of the repo.
|
# of the repo.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from ruamel.yaml.comments import CommentedMap
|
from ruamel.yaml.comments import CommentedMap
|
||||||
|
|
||||||
@ -127,6 +128,18 @@ def handle_file(fn):
|
|||||||
outdata.append(obj)
|
outdata.append(obj)
|
||||||
# We control the last project stanza
|
# We control the last project stanza
|
||||||
outdata.extend(outprojects)
|
outdata.extend(outprojects)
|
||||||
|
if not outprojects:
|
||||||
|
seed = """
|
||||||
|
- project:
|
||||||
|
check:
|
||||||
|
jobs: []
|
||||||
|
gate:
|
||||||
|
jobs: []
|
||||||
|
"""
|
||||||
|
print(
|
||||||
|
f"FATAL: File {fn} last item is not a project definition. "
|
||||||
|
f"Try adding something like:\n{seed}")
|
||||||
|
sys.exit(1)
|
||||||
project = outprojects[-1]['project']
|
project = outprojects[-1]['project']
|
||||||
project['check']['jobs'] = joblist_check
|
project['check']['jobs'] = joblist_check
|
||||||
# Use the same dictionary if there are no non-voting jobs
|
# Use the same dictionary if there are no non-voting jobs
|
||||||
|
Loading…
Reference in New Issue
Block a user