[Twisted-Python] problems with trial and adbapi

donfu fu at donfu.com
Mon Sep 20 05:51:58 EDT 2004

> deferredResult should work just fine, I use it all the
> time with db-related tests. 

I knew beforehand that the mistake was to be searched on my side :-)
I got still much to learn in twistedland.. I forgot to actually return the 
deferred from the database insert operation, so trial didn't wait for the 
insert to complete, and the next operation failed.

to sum it up:

   how to shoot yourself in the foot with twisted:
   you return a deferred to shoot yourself in the foot. when the deferred
   finally fires (!) your foot is already rotten and garbage collected...


More information about the Twisted-Python mailing list