Make FSMBase.step() return an exit code

This commit is contained in:
Kristóf Tóth 2018-07-23 17:14:14 +02:00
parent 1a52ed2c9a
commit 8ba99d8e36

View File

@ -62,5 +62,7 @@ class FSMBase(Machine, CallbackMixin):
try: try:
self.trigger(trigger) self.trigger(trigger)
self.trigger_history.append(trigger) self.trigger_history.append(trigger)
return True
except (AttributeError, MachineError): except (AttributeError, MachineError):
LOG.debug('FSM failed to execute nonexistent trigger: "%s"', trigger) LOG.debug('FSM failed to execute nonexistent trigger: "%s"', trigger)
return False