On 29/09/10 16:56, Chris Withers wrote: > On 28/09/2010 15:21, exar...@twistedmatrix.com wrote: >>> But, more crucially, the looping call then appears to stop. >> >> The function you're looping over returns a Deferred that never fires. >> The LoopingCall isn't stopped, it's waiting for the Deferred. > > So, inlineCallbacks/generator things will only process errbacks, not > actual exceptions raised inside asyncronous code called from them?!
No. The problem is that your example is malformed. You do this: 1. Create a deferred on the "Break" class instance 2. Return it from doStuff 3. You "callLater" doesn't touch that deferred, so the generator/doStuff call a) never calls back and b) discards any errors that happen inside callLater. You want something like this: class Break: def __init__(self): self.deferred = Deferred() def __call__(self): try: del self.connector except: self.deferred.errback() else: self.deferred.callback(1) _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python