[Twisted-Python] Re: Adding callback to a Deferred that's already running?

David Bolen db3l at fitlinxx.com
Thu Aug 26 15:33:53 EDT 2004


David Bolen <db3l at fitlinxx.com> writes:

(oops - minor correction to my last post)

> [Case 2]
> 
> class FooClass(General):
>     def __init__(self, db):
>         self.db = db
> 
>     def step1(self):
>         d = self.db.runQuery(blah)
>         return d.addCallback(self.step2).addCallback(self.step2)

this should be (step3 on the final callback):

          return d.addCallback(self.step2).addCallback(self.step3)

-- David





More information about the Twisted-Python mailing list