parent
b022fc9301
commit
aa0462a35a
|
|
@ -420,10 +420,12 @@ class FSM(DirectObject):
|
|||
cur_index = self.stateArray.index(self.state)
|
||||
new_index = (cur_index + 1) % len(self.stateArray)
|
||||
self.request(self.stateArray[new_index], args)
|
||||
else:
|
||||
elif hasattr(self, 'notifier'):
|
||||
assert self.notifier.debug(
|
||||
"stateArray empty. Can't switch to next.")
|
||||
|
||||
else:
|
||||
assert self.notify.debug(
|
||||
"stateArray empty. Can't switch to next.")
|
||||
finally:
|
||||
self.fsmLock.release()
|
||||
|
||||
|
|
@ -438,9 +440,12 @@ class FSM(DirectObject):
|
|||
cur_index = self.stateArray.index(self.state)
|
||||
new_index = (cur_index - 1) % len(self.stateArray)
|
||||
self.request(self.stateArray[new_index], args)
|
||||
else:
|
||||
elif hasattr(self, 'notifier'):
|
||||
assert self.notifier.debug(
|
||||
"stateArray empty. Can't switch to next.")
|
||||
else:
|
||||
assert self.notify.debug(
|
||||
"stateArray empty. Can't switch to next.")
|
||||
finally:
|
||||
self.fsmLock.release()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue