pvl/dns/process.py
changeset 717 e37b0a857a5d
parent 716 4fecd0d1cf23
equal deleted inserted replaced
716:4fecd0d1cf23 717:e37b0a857a5d
    66 
    66 
    67     for item in zone:
    67     for item in zone:
    68         file.write(unicode(item))
    68         file.write(unicode(item))
    69         file.write('\n')
    69         file.write('\n')
    70 
    70 
    71 def apply_zone (options, args):
    71 def apply_zone (options, args,
       
    72         include_trace=None,
       
    73 ):
    72     """
    74     """
    73         ZoneLine.load() in given zones.
    75         ZoneLine.load() in given zones.
       
    76             
       
    77             include_trace           - append included paths to given list
    74 
    78 
    75         Yields ZoneDirective/ZoneRecord items.
    79         Yields ZoneDirective/ZoneRecord items.
    76     """
    80     """
    77 
    81 
    78     for file in pvl.args.apply_files(args, 'r', options.input_charset) :
    82     for file in pvl.args.apply_files(args, 'r', options.input_charset) :
    79         log.info("%s: reading zone", file.name)
    83         log.info("%s: reading zone", file.name)
       
    84 
       
    85         if include_trace is not None:
       
    86             include_trace.append(file.name)
    80 
    87 
    81         for item in zone.ZoneLine.load(file):
    88         for item in zone.ZoneLine.load(file):
    82             yield item
    89             yield item
    83 
    90 
    84 def apply_zone_records (options, origin, args) :
    91 def apply_zone_records (options, origin, args) :