(self, event_data)
return True
Execute the transition.
        Args:
            event_data: An instance of class EventData.
        Returns: boolean indicating whether or not the transition was
            successfully executed (True if successful, False if not).
Execute the transition.
        Args:
            event_data: An instance of class EventData.
        Returns: boolean indicating whether or not the transition was
            successfully executed (True if successful, False if not).
Execute the transition . Args : event_data : An instance of class EventData . Returns : boolean indicating whether or not the transition was successfully executed ( True if successful False if not ) .
def execute(self, event_data):
        """ Execute the transition.
        Args:
            event_data: An instance of class EventData.
        Returns: boolean indicating whether or not the transition was
            successfully executed (True if successful, False if not).
        """
        _LOGGER.debug("%sInitiating transition from state %s to state %s...",
                      event_data.machine.name, self.source, self.dest)

        event_data.machine.callbacks(self.prepare, event_data)
        _LOGGER.debug("%sExecuted callbacks before conditions.", event_data.machine.name)

        if not self._eval_conditions(event_data):
            return False

        event_data.machine.callbacks(itertools.chain(event_data.machine.before_state_change, self.before), event_data)
        _LOGGER.debug("%sExecuted callback before transition.", event_data.machine.name)

        if self.dest:  # if self.dest is None this is an internal transition with no actual state change
            self._change_state(event_data)

        event_data.machine.callbacks(itertools.chain(self.after, event_data.machine.after_state_change), event_data)
        _LOGGER.debug("%sExecuted callback after transition.", event_data.machine.name)
        return True
def execute ( self , event_data ) : _LOGGER . debug ( "%sInitiating transition from state %s to state %s..." , event_data . machine . name , self . source , self . dest ) event_data . machine . callbacks ( self . prepare , event_data ) _LOGGER . debug ( "%sExecuted callbacks before conditions." , event_data . machine . name ) if not self . _eval_conditions ( event_data ) : return False event_data . machine . callbacks ( itertools . chain ( event_data . machine . before_state_change , self . before ) , event_data ) _LOGGER . debug ( "%sExecuted callback before transition." , event_data . machine . name ) if self . dest : # if self.dest is None this is an internal transition with no actual state change self . _change_state ( event_data ) event_data . machine . callbacks ( itertools . chain ( self . after , event_data . machine . after_state_change ) , event_data ) _LOGGER . debug ( "%sExecuted callback after transition." , event_data . machine . name ) return True