make things work

master
parent 4857fbf564
commit bcc4857174
  1. 7
      DNSLG/Resolver.py
  2. 2
      DNSLG/__init__.py

@ -146,14 +146,19 @@ class Resolver(object):
self.nameservers.extend(
res.to_text() for res in dns.resolver.query(ns, 'aaaa')
)
except:
# TODO: Add error handling here
pass
try:
self.nameservers.extend(
res.to_text() for res in dns.resolver.query(ns, 'a')
)
except:
# TODO: Add error handling here
pass
else:
self.nameservers.append(ns)
print(self.nameservers)
def reset(self):
self.edns = self.original_edns

@ -163,7 +163,7 @@ Disallow: /
elif format == "XML":
mtype = 'application/xml'
elif format == 'OPENMETRICS':
mtype = 'application/openmetrics-text'
mtype = 'text/plain; charset=%s' % self.encoding
else:
output = "Unsupported format \"%s\"\n" % format
send_response(start_response, '400 Bad request', output, plaintype)

Loading…
Cancel
Save