'(internal) Callback for when one of my deferreds fires.'

def _cbDeferred(self, result, index, succeeded):

    self.resultList[index] = (succeeded, result)
    self.finishedCount += 1
    if (not self.called):
        if ((succeeded == SUCCESS) and self.fireOnOneCallback):
            self.callback((result, index))
        elif ((succeeded == FAILURE) and self.fireOnOneErrback):
            self.errback(failure.Failure(FirstError(result, index)))
        elif (self.finishedCount == len(self.resultList)):
            self.callback(self.resultList)
    if ((succeeded == FAILURE) and self.consumeErrors):
        result = None
    return result
