From cb1f17cb0426669ae8e587f7160dd8baae811a6b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 2 Jan 2014 12:15:56 +0100 Subject: [PATCH] Proper patch for an Issue #591 --- lib/utils/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/utils/api.py b/lib/utils/api.py index dd3f4e664..1e946ce53 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -173,6 +173,9 @@ class Task(object): else: return None + def engine_process(self): + return self.process + def engine_kill(self): if self.process: return self.process.kill() @@ -512,7 +515,7 @@ def scan_status(taskid): logger.warning("[%s] Invalid task ID provided to scan_status()" % taskid) return jsonize({"success": False, "message": "Invalid task ID"}) - if DataStore.tasks[taskid].engine_get_returncode() is None: + if DataStore.tasks[taskid].engine_process() is None: status = "not running" else: status = "terminated" if DataStore.tasks[taskid].engine_has_terminated() is True else "running"