From a80cd8779583199ad800be9872bd1d52ce766635 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Fri, 30 Sep 2016 13:18:40 +1000 Subject: [PATCH] check_chair: Actually fail if there is a problem. If we encounter a problem rather than printing and exiting actually fail. This will mean that the pep8 tox environment will also fail. Change-Id: Ife80bc2761fcb075057a17337d2ab63459be2da4 --- tools/check_chair.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/check_chair.py b/tools/check_chair.py index 8c754b6f..3b98ddbd 100644 --- a/tools/check_chair.py +++ b/tools/check_chair.py @@ -16,6 +16,7 @@ from __future__ import print_function import argparse import re +import sys from yaml2ical import meeting @@ -56,11 +57,14 @@ A tool that checks a meeting chair matches the canonical format. args = parser.parse_args() meetings = meeting.load_meetings(args.yaml_dir) + return_code = 0 for m in meetings: ok, msg = check_chair(m.chair) if not ok: + return_code = 1 print(m.filefrom) print(msg.rstrip()) + return return_code if __name__ == '__main__': - main() + sys.exit(main())