File: bind9.py

package info (click to toggle)
python-reconfigure 0.1.74%2Bgit49a20890-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 724 kB
  • ctags: 701
  • sloc: python: 4,201; makefile: 186; sh: 7
file content (11 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
from reconfigure.includers.auto import AutoIncluder
from reconfigure.nodes import PropertyNode


class BIND9Includer (AutoIncluder):
    def is_include(self, node):
        if isinstance(node, PropertyNode) and node.name == 'include':
            return node.value.strip('"')

    def remove_include(self, node):
        return PropertyNode('include', '"%s"' % node.files)