From: Josh Durgin Date: Thu, 3 Dec 2015 01:30:47 +0000 (-0800) Subject: describe-tests: handle ParseErrors from any method X-Git-Tag: 1.1.0~727^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=31479dee3702426dc67c2aef92e4f3d88364e830;p=teuthology.git describe-tests: handle ParseErrors from any method Signed-off-by: Josh Durgin --- diff --git a/teuthology/describe_tests.py b/teuthology/describe_tests.py index ff18e118f..55e58cee5 100644 --- a/teuthology/describe_tests.py +++ b/teuthology/describe_tests.py @@ -11,6 +11,12 @@ from teuthology.exceptions import ParseError from teuthology.suite import build_matrix, combine_path def main(args): + try: + describe_tests(args) + except ParseError: + sys.exit(1) + +def describe_tests(args): suite_dir = os.path.abspath(args[""]) fields = args["--fields"].split(',') include_facet = args['--show-facet'] == 'yes' @@ -133,11 +139,8 @@ def get_combinations(suite_dir, fields, subset, for row in rows]) def describe_suite(suite_dir, fields, include_facet, output_format): - try: - rows = tree_with_info(suite_dir, fields, include_facet, '', [], - output_format=output_format) - except ParseError: - return 1 + rows = tree_with_info(suite_dir, fields, include_facet, '', [], + output_format=output_format) headers = ['path'] if include_facet: