From 58b73bb25bbc509186f5b08ae212508318d183b9 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 6 May 2022 15:20:58 -0400 Subject: [PATCH] r-* tools: suppress BrokenPipeError --- bin/r-diff-testruns | 5 ++++- bin/r-show-testrun | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/r-diff-testruns b/bin/r-diff-testruns index e290214..186f11b 100755 --- a/bin/r-diff-testruns +++ b/bin/r-diff-testruns @@ -102,7 +102,10 @@ def main(): env = jinja2.Environment(loader=jinja2.FunctionLoader(jinja_templatefunc)) template = env.get_template(args.template) - print(template.render(jinja_params)) + try: + print(template.render(jinja_params)) + except BrokenPipeError: + pass logging.info("found %d diff out of %d expfile/subtest rowsets", len(datagrid), rowsets) diff --git a/bin/r-show-testrun b/bin/r-show-testrun index a15fc0a..1a8729e 100755 --- a/bin/r-show-testrun +++ b/bin/r-show-testrun @@ -104,10 +104,13 @@ def main(): } } logging.debug("jinja data: %s", jinja_params) - + env = jinja2.Environment(loader=jinja2.FunctionLoader(jinja_templatefunc)) template = env.get_template(args.template) - print(template.render(jinja_params)) + try: + print(template.render(jinja_params)) + except BrokenPipeError: + pass if __name__ == '__main__': main() -- 2.43.5