Add a status message when one or more tasks returned a non-zero return code, closes #78
authorClaire Wolf <claire@symbioticeda.com>
Tue, 14 Apr 2020 17:54:24 +0000 (19:54 +0200)
committerClaire Wolf <claire@symbioticeda.com>
Tue, 14 Apr 2020 17:54:24 +0000 (19:54 +0200)
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
sbysrc/sby.py

index 4bf354fc040d4a2088645c9012744a93481d23fb..e546c9c8597369e52890a4c4799d2af8347e3d49 100644 (file)
@@ -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)