aboutsummaryrefslogtreecommitdiffstats
path: root/qface/generator.py
diff options
context:
space:
mode:
authorJuergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com>2017-08-03 08:59:50 +0200
committerJuergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com>2017-08-03 08:59:50 +0200
commit395c0d5afefd8aed4762f0b253c1427e7ce9f84d (patch)
treeac3c5c4bf314d68cf2275de0d6394d914f3376d3 /qface/generator.py
parent50e35ba1c6826579cb6ac2504c24083751b8f6b1 (diff)
Added preserve options to rule generator yaml format. You need to
enlist the target document in the preserve line to withc on the preserve option of the generator for the document.
Diffstat (limited to 'qface/generator.py')
-rw-r--r--qface/generator.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/qface/generator.py b/qface/generator.py
index b3a546a..ac1baeb 100644
--- a/qface/generator.py
+++ b/qface/generator.py
@@ -193,8 +193,10 @@ class RuleGenerator(Generator):
self.context.update(context)
self.context.update(rule.get('context', {}))
self.destination = rule.get('destination', None)
+ preserved = rule.get('preserve', [])
for target, source in rule.get('documents', {}).items():
- self.write(target, source)
+ preserve = target in preserved
+ self.write(target, source, preserve=preserve)
class FileSystem(object):