7 A state machine that is always executed alone when becoming active. 10 active_container =
None 12 def __init__(self, conditions=dict(), *args, **kwargs):
13 super(PriorityContainer, self).
__init__(*args, **kwargs)
17 if (PriorityContainer.active_container
is None 18 or not all(p == PriorityContainer.active_container.split(
'/')[i]
19 for i, p
in enumerate(self.path.split(
'/')))):
21 PriorityContainer.active_container = self.
path 23 outcome = OperatableStateMachine.execute(self, *args, **kwargs)
25 if outcome
is not None:
def __init__(self, conditions=dict(), args, kwargs)
def execute(self, args, kwargs)