[Twisted-Python] run queries in deffered, but not in transaction
Mark Visser
markv at lumierevfx.com
Thu Sep 17 10:51:33 MDT 2009
Matt Perry wrote:
> would swallow any exceptions thrown by deferred1 and continue on to
> create deferred2. If you did:
>
> d.addCallback(foo)
> d.addCallback(bar)
> d.addCallback(baz)
>
> then an exception in "foo" would break the whole callback chain.
You can also use addBoth(), which adds a callback and errback at the
same time. Though I prefer the @inlineCallbacks semantics, since they
produce much more readable code.
cheers,
-Mark
More information about the Twisted-Python
mailing list