def engine_stopped(self): if self.log_task.running: self.log_task.stop() if self.reanimate_task.running: self.reanimate_task.stop()