commit 91cf87964cef7ac5b31b37367665224314da080e
parent 4219572de9b6c433545fe8a6c3e65c3925f11c05
Author: rexxnor <rexxnor+gnunet@brief.li>
Date: Thu, 23 May 2019 17:35:16 +0200
fixed the zone hierarchy bug
Diffstat:
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/ascension/ascension.py b/ascension/ascension.py
@@ -597,16 +597,13 @@ class Ascender():
# ("." is not a zone-cut in DNS, but always in GNS).
for name in self.zone.nodes.keys():
subzones = str(name).split('.')
- # FIXME Christian: For some reason this fails spectacularly # how exactly?
- for i in range(1, len(subzones)-1):
+ for i in range(1, len(subzones)):
subdomain = ".".join(subzones[i:])
- # FIXME Christian this seems superfluous # that depends, does subzones already contain .domain?
zonename = "%s.%s" % (subdomain, self.domain)
ttl = self.minimum # new record, cannot use existing one, might want to use larger value
if self.subzonedict.get(zonename) is None:
- pkey = self.create_zone_and_get_pkey("%s.%s" %
- (zonename,
- self.domain))
+ print("%s.%s" % (subdomain, self.domain))
+ pkey = self.create_zone_and_get_pkey(zonename)
self.subzonedict[zonename] = (pkey, ttl)
# Check if a delegated zone is available in GNS as per NS record