[Twisted-Python] wired problem with deferreds
Drew Smathers
drew.smathers at gmail.com
Mon Feb 4 10:18:51 MST 2008
On Feb 3, 2008 2:41 PM, markus espenhain <me at mocisoft.com> wrote:
> is there something i overlooked so that cb2 isn't called with the
> required arg?
>
What are you trying to do? This is quite a convoluted example.
Nonetheless, this does make me wonder what the heck is going on. To appease
my curiosity, I added debug statements to Defer._runCallbacks:
...
try:
self._runningCallbacks = True
try:
print 'calling %r (%r)' % (callback, self)
self.result = callback(self.result, *args, **kw)
print 'Got result', self.result
finally:
self._runningCallbacks = False
if isinstance(self.result, Deferred):
...
And this is the output:
...
calling <function cb1 at 0x82a3e9c> (<Deferred at 0xb7a34c8cL current
result: 'S'>)
cb1 S
Got result S
Got result None
...
WTF? How on earth can this even happen???
--
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
d.p.s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20080204/ba7dcaa0/attachment.html>
More information about the Twisted-Python
mailing list