From f49cd7c1a095cb9bd44677b0a1cd85c3c7985886 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 30 Jan 2017 12:04:35 +0100 Subject: [PATCH] Fix bug in task management --- sbysrc/sby_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index c9956cf..f18138a 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -97,11 +97,11 @@ class SbyTask: if self.p.poll() is not None: self.job.log("%s: finished (returncode=%d)" % (self.info, self.p.returncode)) - self.handle_exit(self.p.returncode) - self.job.tasks_running.remove(self) self.running = False + self.handle_exit(self.p.returncode) + if self.checkretcode and self.p.returncode != 0: self.job.status = "ERROR" self.job.log("%s: job failed. ERROR." % self.info) -- 2.30.2