[Twisted-web] Error output for bad deferred method signatures?
Lenny G Arbage
alengarbage at yahoo.com
Wed Nov 30 10:04:11 MST 2005
I'm curious why errors aren't reported when deferreds
are fired if the deferred method has a bad signature.
For example, if the following is run:
import httplib, sys
from twisted.web import client
from twisted.internet import reactor, threads, defer
from twisted.protocols import http
from twisted.python import failure
self.deferred = factory.deferred
def _gotResponse(self, resp, factory):
def _errSendReq(self, err, factory):
if __name__ == '__main__':
d = sendRequest()
The deferred _gotResponse() and _errSendReq() fire
perfectly, but the test() function in __main__ is not
called for "success" or "failure". This is expected
as the signature is wrong -- it should be
'test(respOrErr, msg)'. What isn't clear [to me] is
why this doesn't produce an error upon firing the
deferred, but instead produces an error when the
reactor shuts down [via ctrl-c], which could be hours
I have an instance of this that is more severe, where
the error output is *never* produced (maybe because of
Is this the expected behavior, or am I doing something
atrocious to produce it?
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
More information about the Twisted-web