def addCallbacks(
        self,
        callback,
        errback=None,
        callbackArgs=None,
        callbackKeywords=None,
        errbackArgs=None,
        errbackKeywords=None
    ):
        """
        Add a pair of callbacks that will be run in the context of an eliot
        action.

        @return: C{self}
        @rtype: L{DeferredContext}

        @raises AlreadyFinished: L{DeferredContext.addActionFinish} has been
            called. This indicates a programmer error.
        """
        if self._finishAdded:
            raise AlreadyFinished()

        if errback is None:
            errback = _passthrough

        def callbackWithContext(*args, **kwargs):
            return self._action.run(callback, *args, **kwargs)

        def errbackWithContext(*args, **kwargs):
            return self._action.run(errback, *args, **kwargs)

        self.result.addCallbacks(
            callbackWithContext, errbackWithContext, callbackArgs,
            callbackKeywords, errbackArgs, errbackKeywords)
        return self
def addCallbacks ( self , callback , errback = None , callbackArgs = None , callbackKeywords = None , errbackArgs = None , errbackKeywords = None ) : if self . _finishAdded : raise AlreadyFinished ( ) if errback is None : errback = _passthrough def callbackWithContext ( * args , ** kwargs ) : return self . _action . run ( callback , * args , ** kwargs ) def errbackWithContext ( * args , ** kwargs ) : return self . _action . run ( errback , * args , ** kwargs ) self . result . addCallbacks ( callbackWithContext , errbackWithContext , callbackArgs , callbackKeywords , errbackArgs , errbackKeywords ) return self
Add a pair of callbacks that will be run in the context of an eliot
        action.

        @return: C{self}
        @rtype: L{DeferredContext}

        @raises AlreadyFinished: L{DeferredContext.addActionFinish} has been
            called. This indicates a programmer error.