def gather_deferreds(deferreds):
 results_or_first_failure = gatherResults(deferreds)
 def log_and_discard(failure):
  '\n        Log the supplied failure and discard it.\n\n        The failure is deliberately discarded so as to prevent any further\n        logging of this failure when the deferred is eventually garbage\n        collected.\n\n        :param Failure failure: The ``Failure`` to be logged.\n        '
  write_failure(failure)
 for deferred in deferreds:
  deferred.addErrback(log_and_discard)
 gathering = gatherResults(deferreds)
 gathering.addCallback((lambda ignored: results_or_first_failure))
 return gathering

def gather_deferreds ( deferreds ) : results_or_first_failure = gatherResults ( deferreds ) def log_and_discard ( failure ) : write_failure ( failure ) for deferred in deferreds : deferred . addErrback ( log_and_discard ) gathering = gatherResults ( deferreds ) gathering . addCallback ( ( lambda ignored : results_or_first_failure ) ) return gathering
return a deferred which fires when all of the supplied deferreds have themselves fired .