diff --git a/lib/tfw/fsm_base.py b/lib/tfw/fsm_base.py index fe3a01a..3cc2af5 100644 --- a/lib/tfw/fsm_base.py +++ b/lib/tfw/fsm_base.py @@ -22,7 +22,7 @@ class FSMBase(Machine, CallbackMixin): states, transitions = [], [] def __init__(self, initial=None, accepted_states=None): - self.accepted_states = accepted_states or [self.states[-1]] + self.accepted_states = accepted_states or [self.states[-1].name] self.trigger_predicates = defaultdict(list) self.trigger_history = []