Fix FSMBase default accepted_state

This commit is contained in:
Kristóf Tóth 2018-07-20 14:38:26 +02:00
parent 446d453947
commit e1e0acb3b8

View File

@ -22,7 +22,7 @@ class FSMBase(Machine, CallbackMixin):
states, transitions = [], [] states, transitions = [], []
def __init__(self, initial=None, accepted_states=None): 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_predicates = defaultdict(list)
self.trigger_history = [] self.trigger_history = []