File: supervisor.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-- 368 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 Node, PropertyNode


class SupervisorIncluder (AutoIncluder):
    def is_include(self, node):
        if node.name == 'include':
            return node.get('files').value

    def remove_include(self, node):
        return Node('include', children=[PropertyNode('files', node.files)])