[Twisted-Python] FirstError handling from defer.gatherResults()?
daedalus at eigenmagic.com
Tue Nov 4 19:58:41 EST 2008
I'm missing something obvious, so I must consult the gurus of the list:
I have some code that gets info from remote devices, a little like this:
dlist = 
for thing in thinglist:
d = thing.fetch_info()
If an error occurs, gatherResults() behaves like
DeferredList(fireOnOneErrback=True), but the errback will receive a
FirstError object, not a Failure.
Normally, I'd do something like this in an Errback:
e = failure.trap(MyNonFatalException)
log.debug("Not a fatal failure. Getting info again.")
But what is the right way to do this when I receive a FirstError?
Justin Warren <daedalus at eigenmagic.com>
More information about the Twisted-Python