when i run the code: df = Deferred() name = Name('version.bind') axf = AXFRController(name,df) dns = DNSDatagramProtocol(axf) d = dns.query((ip,53),[Query('version.bind',TXT,CH)]) it raise the error : Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/twisted/python/log.py", line 73, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite why = selectable.doRead() --- <exception caught here> --- File "/usr/local/lib/python2.7/site-packages/twisted/internet/udp.py", line 149, in doRead self.protocol.datagramReceived(data, addr) File "/usr/local/lib/python2.7/site-packages/twisted/names/dns.py", line 1936, in datagramReceived self.controller.messageReceived(m, self, addr) exceptions.TypeError: messageReceived() takes exactly 3 arguments (4 given) Unhandled Error
and the I set the DNSDatagramProtocol.datagramReceived's last row self.controller.messageReceived(m, self, addr) to self.controller.messageReceived(m, self) it'ok! And this is a bug????
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python