pvl.hosts.zone: alias= labels cannot be out of origin
authorTero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 16:02:43 +0200
changeset 495 629fc999cc33
parent 494 6d258338b363
child 496 530f22575889
pvl.hosts.zone: alias= labels cannot be out of origin
pvl/hosts/zone.py
--- a/pvl/hosts/zone.py	Thu Feb 26 16:01:10 2015 +0200
+++ b/pvl/hosts/zone.py	Thu Feb 26 16:02:43 2015 +0200
@@ -54,28 +54,19 @@
             raise HostZoneError(host, error)
 
     for alias in host.alias:
-        try:
-            yield pvl.dns.ZoneRecord.CNAME(pvl.dns.relative(origin, host.domain, alias), label)
-        except ValueError as error:
-            raise HostZoneError(host, error)
+        yield pvl.dns.ZoneRecord.CNAME(pvl.dns.relative(origin, host.domain, alias), label)
 
     for alias in host.alias4:
         if not host.ip:
             raise HostZoneError(host, "alias4={host.alias4} without ip=".format(host=host))
 
-        try:
-            yield pvl.dns.ZoneRecord.A(pvl.dns.relative(origin, host.domain, alias), host.ip)
-        except ValueError as error:
-            raise HostZoneError(host, error)
+        yield pvl.dns.ZoneRecord.A(pvl.dns.relative(origin, host.domain, alias), host.ip)
 
     for alias in host.alias6:
         if not host.ip6:
             raise HostZoneError(host, "alias6={host.alias6} without ip6=".format(host=host))
 
-        try:
-            yield pvl.dns.ZoneRecord.AAAA(pvl.dns.relative(origin, host.domain, alias), host.ip6)
-        except ValueError as error:
-            raise HostZoneError(host, error)
+        yield pvl.dns.ZoneRecord.AAAA(pvl.dns.relative(origin, host.domain, alias), host.ip6)
 
 def host_reverse (host, prefix) :
     """