source: ralphm-patches/disco_simplify_gatherResults.patch @ 43:db824c2e8652

Last change on this file since 43:db824c2e8652 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/disco.py

    diff -r 101119987680 -r 0d666be7ca0f wokkel/disco.py
    a b  
    495495        """
    496496        Gather results from a list of deferreds.
    497497
    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.
    502499
    503500        @param deferredList: List of deferreds for which the results should be
    504501                             gathered.
     
    512509                results.extend(value)
    513510            return results
    514511
    515         def eb(failure):
    516             failure.trap(defer.FirstError)
    517             return failure.value.subFailure
    518 
    519512        d = defer.DeferredList(deferredList, fireOnOneErrback=1,
    520513                                             consumeErrors=1)
    521         d.addCallbacks(cb, eb)
     514        d.addCallback(cb)
    522515        return d
    523516
    524517
Note: See TracBrowser for help on using the repository browser.