From e1e0acb3b86fa77f343bebc3d12953e6507da608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 20 Jul 2018 14:38:26 +0200 Subject: [PATCH] Fix FSMBase default accepted_state --- lib/tfw/fsm_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = []