From 8ba99d8e36887491f51da5278c7ba7d8b6a25b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Mon, 23 Jul 2018 17:14:14 +0200 Subject: [PATCH] Make FSMBase.step() return an exit code --- lib/tfw/fsm_base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tfw/fsm_base.py b/lib/tfw/fsm_base.py index 3cc2af5..7ae8157 100644 --- a/lib/tfw/fsm_base.py +++ b/lib/tfw/fsm_base.py @@ -62,5 +62,7 @@ class FSMBase(Machine, CallbackMixin): try: self.trigger(trigger) self.trigger_history.append(trigger) + return True except (AttributeError, MachineError): LOG.debug('FSM failed to execute nonexistent trigger: "%s"', trigger) + return False