#NEWLINE# def addCallbacks( self , callback , errback = None , callbackArgs = None , callbackKeywords = None , errbackArgs = None , errbackKeywords = None ) : #NEWLINE# #INDENT# "\n        Add a pair of callbacks (success and error) to this L{Deferred}.\n\n        These will be executed when the 'master' callback is run.\n\n        @return: C{self}.\n        @rtype: a L{Deferred}\n        " #NEWLINE# assert callable ( callback ) #NEWLINE# assert ( ( errback is None ) or callable ( cbs ) ) #NEWLINE# cbs = ( ( callback , callbackArgs , callbackKeywords ) , ( ( errback or passthru ) , errbackArgs , errbackKeywords ) ) #NEWLINE# self . callbacks . append ( cbs ) #NEWLINE# if self . called : #NEWLINE# #INDENT# self . _runCallbacks ( ) #NEWLINE# #UNINDENT# return self