(self, model, *args, **kwargs)
Extends transitions.core.Event.trigger by using locks/machine contexts.
Extends transitions.core.Event.trigger by using locks/machine contexts.
Extends transitions . core . Event . trigger by using locks / machine contexts .
def trigger(self, model, *args, **kwargs):
        """ Extends transitions.core.Event.trigger by using locks/machine contexts. """
        # pylint: disable=protected-access
        # noinspection PyProtectedMember
        # LockedMachine._locked should not be called somewhere else. That's why it should not be exposed
        # to Machine users.
        if self.machine._ident.current != get_ident():
            with nested(*self.machine.model_context_map[id(model)]):
                return _super(LockedEvent, self).trigger(model, *args, **kwargs)
        else:
            return _super(LockedEvent, self).trigger(model, *args, **kwargs)
def trigger ( self , model , * args , * * kwargs ) : # pylint: disable=protected-access # noinspection PyProtectedMember # LockedMachine._locked should not be called somewhere else. That's why it should not be exposed # to Machine users. if self . machine . _ident . current != get_ident ( ) : with nested ( * self . machine . model_context_map [ id ( model ) ] ) : return _super ( LockedEvent , self ) . trigger ( model , * args , * * kwargs ) else : return _super ( LockedEvent , self ) . trigger ( model , * args , * * kwargs )