Closedown
This commit is contained in:
@@ -363,6 +363,7 @@ class RobotTCP(TcpDevice, Stoppable):
|
||||
self.getLogger().info(ev)
|
||||
self.on_event(ev)
|
||||
if (self.current_task is not None) and (self.get_task_status(self.current_task)[0]<0):
|
||||
print "Resetting", self.get_task_status(self.current_task)
|
||||
self.current_task = None
|
||||
self._update_state()
|
||||
self.setCache({"powered": self.powered,
|
||||
@@ -382,6 +383,7 @@ class RobotTCP(TcpDevice, Stoppable):
|
||||
for task in (self.high_level_tasks + [program]):
|
||||
if (task is not None) and (self.get_task_status(task)[0]>=0):
|
||||
raise Exception("Ongoing high-level task: " + task)
|
||||
print "Setting ", self.current_task
|
||||
self.current_task = program
|
||||
self.task_create(program, *args, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user