[Twisted-Python] Twisted DNS issues

<itamar> next, if you fail to connect to a DNS server, you get a traceback <itamar> something about passing extra args to connectionLost <moshez> itamar: yeah, I know. <moshez> itamar: ugh. <itamar> now, moving onwards <itamar> consider this code: <moshez> itamar: I didn't know about that <itamar> r = dns.ResolveConfResolver() <itamar> d = defer.Deferred().addCallback(printer).addErrback(printer) <itamar> d.arm() <itamar> r.resolve(d, "www.zoteca.com") <itamar> the result should be that printer() is based the IP, right? <itamar> but it doesn't <moshez> itamar: whatis it? <itamar> because in SentQuery.getAnswer, we do: <itamar> process = getattr(self, 'processAnswer_%d' % message.answers[0].type, None) <itamar> if process is None: <itamar> self.errback( <itamar> etc. <itamar> now, the first of the answers always seems to have type 5 <itamar> answers[1], 2, etc. seem to have the content <itamar> so it always fails <itamar> because you don't have processAnswer_5 <moshez> itamar: oh, I see. <itamar> conclusion: DNS needs a good accepttests suite
participants (1)
-
Itamar Shtull-Trauring