source: ralphm-patches/disco_simplify_gatherResults.patch @ 54:03ec57713c90

Last change on this file since 54:03ec57713c90 was 43:db824c2e8652, checked in by Ralph Meijer <ralphm@…>, 12 years ago

Split out gatherResults changes, apply pubsub and disco fixes upstream.

File size: 1.1 KB
  • wokkel/

    diff -r 101119987680 -r 0d666be7ca0f wokkel/
    a b  
    495495        """
    496496        Gather results from a list of deferreds.
    498         Similar to L{defer.gatherResults}, but flattens the returned results,
    499         consumes errors after the first one and fires the errback of the
    500         returned deferred with the failure of the first deferred that fires its
    501         errback.
     498        Similar to L{defer.gatherResults}, but flattens the returned results.
    503500        @param deferredList: List of deferreds for which the results should be
    504501                             gathered.
    512509                results.extend(value)
    513510            return results
    515         def eb(failure):
    516             failure.trap(defer.FirstError)
    517             return failure.value.subFailure
    519512        d = defer.DeferredList(deferredList, fireOnOneErrback=1,
    520513                                             consumeErrors=1)
    521         d.addCallbacks(cb, eb)
     514        d.addCallback(cb)
    522515        return d
Note: See TracBrowser for help on using the repository browser.