From a5fce77344286c014ae4a58a3f51b68b4ec4f7cd Mon Sep 17 00:00:00 2001 From: Claire Wolf Date: Mon, 27 Jan 2020 17:59:33 +0100 Subject: [PATCH] Add special handling for command not found errors Signed-off-by: Claire Wolf --- sbysrc/sby_core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 5d41fd8..5fbc308 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -167,6 +167,13 @@ class SbyTask: all_tasks_running.remove(self) self.running = False + if self.p.returncode == 127: + self.job.status = "ERROR" + self.job.log("%s: COMMAND NOT FOUND. ERROR." % self.info) + self.terminated = True + self.job.terminate() + return + self.handle_exit(self.p.returncode) if self.checkretcode and self.p.returncode != 0: -- 2.30.2