bin/pvl.dns-zone
changeset 294 29720bbc5379
parent 293 6351acf3eb3b
child 316 41bd6688b142
--- a/bin/pvl.dns-zone	Mon Dec 16 23:16:32 2013 +0200
+++ b/bin/pvl.dns-zone	Tue Dec 17 00:42:31 2013 +0200
@@ -170,7 +170,11 @@
     for line, rr in zone :
         if rr and rr.type == 'SOA' :
             # XXX: as SOA record..
-            soa = pvl.dns.zone.SOA.parse(line)
+            try :
+                soa = pvl.dns.zone.SOA.parse(line)
+            except TypeError as error :
+                log.exception("%s: unable to parse SOA: %s", rr.name, rr)
+                sys.exit(2)
 
             yield line, pvl.dns.zone.SOA(
                     soa.master, soa.contact,