Add special handling for command not found errors
authorClaire Wolf <clifford@clifford.at>
Mon, 27 Jan 2020 16:59:33 +0000 (17:59 +0100)
committerClaire Wolf <clifford@clifford.at>
Mon, 27 Jan 2020 16:59:33 +0000 (17:59 +0100)
Signed-off-by: Claire Wolf <clifford@clifford.at>
sbysrc/sby_core.py

index 5d41fd8e9c0e708b22f2b06f4651363f260c2a9c..5fbc308458e4a1cad30fd09d4aa91fe3dc4a5027 100644 (file)
@@ -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: