From c91efe15a3d98884c4e8fe3c1791581d5753216e Mon Sep 17 00:00:00 2001 From: Claire Wolf Date: Tue, 14 Apr 2020 19:54:24 +0200 Subject: [PATCH] Add a status message when one or more tasks returned a non-zero return code, closes #78 Signed-off-by: Claire Wolf --- sbysrc/sby.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbysrc/sby.py b/sbysrc/sby.py index 4bf354f..e546c9c 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -410,4 +410,8 @@ retcode = 0 for t in tasknames: retcode |= run_job(t) +if retcode and (len(tasknames) > 1 or tasknames[0] is not None): + tm = localtime() + print("SBY {:2d}:{:02d}:{:02d} One or more tasks produced a non-zero return code.".format(tm.tm_hour, tm.tm_min, tm.tm_sec)) + sys.exit(retcode) -- 2.30.2