[Twisted-Python] deferredGenerator ad errbacks
manlio_perillo at libero.it
Sat Apr 15 06:02:21 EDT 2006
I have started to use deferredGenerator:
from twisted.internet import defer, reactor
"""It would be nice to have this in twisted.internet.defer.
Thanks to Matt Goodall.
d = defer.Deferred()
reactor.callLater(seconds, lambda: d.callback(None))
d = defer.waitForDeferred(defer.succeed(1))
d = defer.waitForDeferred(defer.fail(Exception("error 1")))
# raise Exception("error 2")
d = defer.waitForDeferred(defer.succeed(2))
g = generator()
The "problem" is that my errback is never called.
Is this a limitation of the deferred Generators?
Thanks Manlio Perillo
More information about the Twisted-Python