[Twisted-Python] adbapi.operationDone

Steve Waterbury waterbug at beeblebrox.gsfc.nasa.gov
Mon Dec 9 15:29:29 EST 2002


Twisted Gurus,

Yet another sophomoric question :^) ...

The only way I've come up with to pass in a value to 
adbapi.Augmentation.operationDone(done) is as follows:

class MyAug(Augmentation):
    def addThingy(self, whatever):
        args = munge(whatever) # make some sql, etc.
        out = self.runOperation(*args)
        out.addCallback(lambda x: self.operationDone('addThingy'))
        out.addErrback(self.operationError)
...

This works, but is there a more orthodox(/elegant) way?  I've 
tried many permutations of using callbackArgs, without success.

BTW, thanks for all the new twisted stuff ... I'm just starting 
to use lore ... very cool!  

Cheers,
-- Steve.




More information about the Twisted-Python mailing list