[Twisted-Python] Re: Making DeferredList look like Deferred

Thomas HERVE therve at free.fr
Mon Feb 6 12:07:45 EST 2006


Quoting Lenny G Arbage <alengarbage at yahoo.com>:

>  Thomas, thanks for the response.

You're welcome :).

> I thought that
> might be it, but no avail.  If I 'return err' in
> iterfail, I get:
>
[snip]
> Unhandled error in Deferred:

That's expected behaviour.

>  I don't know why the error is unhandled in either
> case -- the DeferredList has an errback set.  (If I
> raise a new error in iterfail, the same result occurs,
> naturally).  It also doesn't seem to matter whether I
> add 'fireOnOneErrBack' to the DeferredList constructor
> or not.  Any ideas?  Does this code behave differently
> on your machine?

The behaviour you want is provided by the option 'consumeErrors' of 
DeferredList
(you can see why here :
http://twistedmatrix.com/projects/core/documentation/howto/defer.html#auto8).

-- 
Thomas






More information about the Twisted-Python mailing list