def stop(self, threaded = True): self.lock.acquire() if self.debug : print("Stopping machine \'"+ self.name+"\'") self.status = self.Status.Stopped for submachine in self.submachines.values(): submachine.stop() RepeatedTask.cancel(self) self.lock.release()
def stop(self): if self.status == self.Status.Playing or self.status == self.Status.Suspended : if self.debug : print("Stopping machine \'"+ self.name+"\'") if self.threaded: RepeatedTask.cancel(self) self.status = self.Status.Stopped for submachine in self.submachines.values(): submachine.stop() if self.onstop: try : exec(self.onstop, self.globals, self.locals) except Exception as e: self.error = "[" + str(datetime.datetime.now().time()) + "] " + " Failed to exec onstop : " + str(e) print("Failed to exec onstop of machine "+ self.name + ": "+ str(e)) raise Exception(self.error) self.state = self.states["Initial"]
def stop(self, threaded = True): if self.debug : print("Stopping machine '"+ self.name+"'") self.status = self.Status.Stopped RepeatedTask.cancel(self)
def stop(self, threaded = True): if self.debug : print("Stopping machine '"+ self.name+"'") self.status = self.Status.Stopped for submachine in self.submachines.values(): submachine.stop() RepeatedTask.cancel(self)