Simple FSM implementation.
- def __init__(self, initial_state):
+ def __init__(self, initial_state):
self.state = initial_state.name
+ self.verify_on_execute = verify_on_execute
Best only called on fully formed machines, checks for unreachable states
Transitions the machine to its new state.
- if not new_state in self.states:
+ if self.verify_on_execute:
+ if not new_state in self.states:
exiting_state = self.states[self.state]