File: bind9.py

package info (click to toggle)
python-reconfigure 0.1.59%2Bgit20140824-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 708 kB
  • ctags: 692
  • sloc: python: 4,139; makefile: 181
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)