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