timid/modifiers.py
def pre_call(self, ctxt, pre_mod, post_mod, action):
        """
        A modifier hook function.  This is called in priority order prior
        to invoking the ``Action`` for the step.  This allows a
        modifier to alter the context, or to take over subsequent
        action invocation.

        :param ctxt: The context object.
        :param pre_mod: A list of the modifiers preceding this
                        modifier in the list of modifiers that is
                        applicable to the action.  This list is in
                        priority order.
        :param post_mod: A list of the modifiers following this
                         modifier in the list of modifiers that is
                         applicable to the action.  This list is in
                         priority order.
        :param action: The action that will be performed.

        :returns: A ``None`` return value indicates that the modifier
                  is taking no action.  A non-``None`` return value
                  should consist of a ``StepResult`` object; this will
                  suspend further ``pre_call()`` processing and
                  proceed to the ``post_call()`` processing.  This
                  implementation returns a ``StepResult`` with state
                  ``SKIPPED`` if the condition does not evaluate to
                  ``True``.
        """

        # Check the condition
        if not self.condition(ctxt):
            return steps.StepResult(state=steps.SKIPPED)

        return None
def pre_call(self, ctxt, pre_mod, post_mod, action):
        # Check the condition
        if not self.condition(ctxt):
            return steps.StepResult(state=steps.SKIPPED)

        return None
def pre_call ( self , ctxt , pre_mod , post_mod , action ) : # Check the condition if not self . condition ( ctxt ) : return steps . StepResult ( state = steps . SKIPPED ) return None
A modifier hook function.  This is called in priority order prior
        to invoking the ``Action`` for the step.  This allows a
        modifier to alter the context, or to take over subsequent
        action invocation.

        :param ctxt: The context object.
        :param pre_mod: A list of the modifiers preceding this
                        modifier in the list of modifiers that is
                        applicable to the action.  This list is in
                        priority order.
        :param post_mod: A list of the modifiers following this
                         modifier in the list of modifiers that is
                         applicable to the action.  This list is in
                         priority order.
        :param action: The action that will be performed.

        :returns: A ``None`` return value indicates that the modifier
                  is taking no action.  A non-``None`` return value
                  should consist of a ``StepResult`` object; this will
                  suspend further ``pre_call()`` processing and
                  proceed to the ``post_call()`` processing.  This
                  implementation returns a ``StepResult`` with state
                  ``SKIPPED`` if the condition does not evaluate to
                  ``True``.
A modifier hook function . This is called in priority order prior to invoking the Action for the step . This allows a modifier to alter the context or to take over subsequent action invocation .