summaryrefslogtreecommitdiff
path: root/reconfigure/includers/nginx.py
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
committerAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:26 +0200
commitff1408420159488a106492ccd11dd234967029b6 (patch)
tree473420cee1c5229a427ec4cafead1aa6c0a26800 /reconfigure/includers/nginx.py
Imported Upstream version 0.1.29
Diffstat (limited to 'reconfigure/includers/nginx.py')
-rw-r--r--reconfigure/includers/nginx.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/reconfigure/includers/nginx.py b/reconfigure/includers/nginx.py
new file mode 100644
index 0000000..f9c1c9b
--- /dev/null
+++ b/reconfigure/includers/nginx.py
@@ -0,0 +1,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)