Skip to content
Create a gist now

Instantly share code, notes, and snippets.

the 2nd chained deferred receives None as a result
#!/usr/bin/env python
from twisted.internet import defer
class Baz:
def __init__(self):
self.resultD = defer.Deferred()
def fooMe(self, name):
d = defer.Deferred()
self.resultD.addCallback(d.callback) # or resultD.chainDeferred(d)
def f(result):
print "fooMe(%s) got: %s" % (name, result,)
assert result is not None
return result
return d
defer.Deferred.debug = True # get more info in traceback
b = Baz()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.