summaryrefslogtreecommitdiffstats
path: root/skripti/zone/axfr.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xskripti/zone/axfr.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/skripti/zone/axfr.py b/skripti/zone/axfr.py
index fe508f1..11eaad9 100755
--- a/skripti/zone/axfr.py
+++ b/skripti/zone/axfr.py
@@ -20,8 +20,8 @@ for naslov in naslovi: # opcijsko dodaj tule kakšen try catch
break
config = None
try:
- config = json.loads(b''.join(dns.resolver.resolve("_urejevalnik." + domena, "TXT")[0].strings).decode())
-except dns.resolver.NXDOMAIN:
+ config = json.loads(b''.join(zone["_urejevalnik"].get_rdataset(dns.rdataclass.IN, dns.rdatatype.TXT)[0].strings).decode())
+except KeyError:
pass
except json.decoder.JSONDecodeError:
pass
@@ -53,7 +53,8 @@ for r in zone.iterate_rdatas():
konec = config["i"][r[0].to_unicode()]
print(r[0].to_unicode(), end=konec)
if r[1] != config["t"]:
- print(r[1], end="\t")
+ print(r[1], end="")
+ print("\t", end="")
if r[2].rdclass != dns.rdataclass.IN:
print(r[2].rdataclass.name, end="\t")
print(r[2].rdtype.name, end="\t")