summaryrefslogtreecommitdiff
path: root/reconfigure/includers/nginx.py
blob: f9c1c9b699c1bc34db4f38c4153e9bada725e413 (plain)
1
2
3
4
5
6
7
8
9
10
11
from reconfigure.includers.auto import AutoIncluder
from reconfigure.nodes import PropertyNode


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

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