diff --git a/script/RobotTCP.py b/script/RobotTCP.py index c791269..37bf4cb 100644 --- a/script/RobotTCP.py +++ b/script/RobotTCP.py @@ -410,11 +410,8 @@ class RobotTCP(TcpDevice, Stoppable): self.task_kill(task) def get_task(self): - if self.current_task is not None: - if self.get_task_status(self.current_task)[0]>=0: - return self.current_task - else: - self.current_task = None + if self.current_task is not None: + return self.current_task for task in self.high_level_tasks: if self.get_task_status(task)[0]>=0: self.current_task = task