From 57d2475ebc6152685c53c0652ade8ca5cdbb7e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 6 Jul 2018 15:40:27 +0100 Subject: [PATCH] Fix invalid trigger killing FSMBase --- lib/tfw/fsm_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tfw/fsm_base.py b/lib/tfw/fsm_base.py index 155997e..b7f270d 100644 --- a/lib/tfw/fsm_base.py +++ b/lib/tfw/fsm_base.py @@ -3,7 +3,7 @@ from collections import defaultdict -from transitions import Machine +from transitions import Machine, MachineError from tfw.mixins import CallbackMixin from tfw.config.logs import logging @@ -61,5 +61,5 @@ class FSMBase(Machine, CallbackMixin): if all(predicate_results): try: self.trigger(trigger) - except AttributeError: + except (AttributeError, MachineError): LOG.debug('FSM failed to execute nonexistent trigger: "%s"', trigger)