mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-01 02:31:20 +00:00
Fix invalid trigger killing FSMBase
This commit is contained in:
parent
7cfa63bacf
commit
57d2475ebc
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from transitions import Machine
|
from transitions import Machine, MachineError
|
||||||
|
|
||||||
from tfw.mixins import CallbackMixin
|
from tfw.mixins import CallbackMixin
|
||||||
from tfw.config.logs import logging
|
from tfw.config.logs import logging
|
||||||
@ -61,5 +61,5 @@ class FSMBase(Machine, CallbackMixin):
|
|||||||
if all(predicate_results):
|
if all(predicate_results):
|
||||||
try:
|
try:
|
||||||
self.trigger(trigger)
|
self.trigger(trigger)
|
||||||
except AttributeError:
|
except (AttributeError, MachineError):
|
||||||
LOG.debug('FSM failed to execute nonexistent trigger: "%s"', trigger)
|
LOG.debug('FSM failed to execute nonexistent trigger: "%s"', trigger)
|
||||||
|
Loading…
Reference in New Issue
Block a user