From 9ec84cb13bcd2d636588506644d111c7e9f504b1 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Tue, 28 Jul 2020 04:32:27 -0500 Subject: catch Exception when zdab-cat fails and continue --- utils/cat-grid-jobs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/cat-grid-jobs b/utils/cat-grid-jobs index 34cb29d..8cbdac3 100755 --- a/utils/cat-grid-jobs +++ b/utils/cat-grid-jobs @@ -37,6 +37,7 @@ from os.path import join, split from subprocess import check_call from sddm import splitext, which from sddm.logger import Logger +import subprocess log = Logger() @@ -115,7 +116,11 @@ def cat_grid_jobs(conn, output_dir, zdab_dir=None): # about PMT types and fit results with open(os.devnull, 'w') as f: log.debug("zdab-cat %s -o %s" % (filename,output)) - check_call([zdab_cat,filename,"-o",output],stderr=f) + try: + check_call([zdab_cat,filename,"-o",output],stderr=f) + except subprocess.CalledProcessError as e: + log.warn(str(e)) + continue total_events = 0 events_with_fit = 0 -- cgit