pvl.dns.zone: passthrough ORIGIN/TTL lines, better warn on unparsed lines
authorTero Marttila <terom@paivola.fi>
Tue, 17 Dec 2013 10:25:07 +0200
changeset 300 a720bcf96007
parent 299 df653511caf9
child 301 b41902b0b9cf
pvl.dns.zone: passthrough ORIGIN/TTL lines, better warn on unparsed lines
pvl/dns/zone.py
--- a/pvl/dns/zone.py	Tue Dec 17 01:15:37 2013 +0200
+++ b/pvl/dns/zone.py	Tue Dec 17 10:25:07 2013 +0200
@@ -50,11 +50,15 @@
                     origin, = args
                     
                     log.info("%s: origin: %s", line, origin)
+                    
+                    yield line, None
 
                 elif directive == 'TTL' :
                     ttl, = args
                     
                     log.info("%s: ttl: %s", line, ttl)
+                    
+                    yield line, None
                 
                 elif directive == 'GENERATE' :
                     if expand_generate :
@@ -250,7 +254,7 @@
             if record :
                 yield record
             else :
-                log.warn("%s: %s", file, line)
+                log.warn("%s: unparsed line: %s", file.name, line)
 
     @classmethod
     def parse (cls, line, name=None, parts=None, ttl=None, **opts) :