summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/SGenshi.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-04-16 18:47:08 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-04-16 18:47:08 +0000
commite5741b35538a80451f1dfadb47abebb1723ef532 (patch)
tree0bf286e249656f909fc4394c6d1a7a2af145dae0 /src/lib/Server/Plugins/SGenshi.py
parent6310bb96580eb9f110472d72c85c918df552fb61 (diff)
downloadbcfg2-e5741b35538a80451f1dfadb47abebb1723ef532.tar.gz
bcfg2-e5741b35538a80451f1dfadb47abebb1723ef532.tar.bz2
bcfg2-e5741b35538a80451f1dfadb47abebb1723ef532.zip
Enable properties for use in SGenshi templates
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4545 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/SGenshi.py')
-rw-r--r--src/lib/Server/Plugins/SGenshi.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/SGenshi.py b/src/lib/Server/Plugins/SGenshi.py
index 469cd493e..0b884baae 100644
--- a/src/lib/Server/Plugins/SGenshi.py
+++ b/src/lib/Server/Plugins/SGenshi.py
@@ -17,11 +17,18 @@ class SGenshiTemplateFile(Bcfg2.Server.Plugins.TGenshi.TemplateFile):
class SGenshiEntrySet(Bcfg2.Server.Plugin.EntrySet):
def __init__(self, path, fam):
fpattern = '[A-Za-z]+\.xml'
+ try:
+ properties = Bcfg2.Server.Plugin.TemplateProperties( \
+ '%s/../etc/properties.xml' % (path), fam)
+ except:
+ properties = Bcfg2.Server.Plugin.FakeProperties()
+
Bcfg2.Server.Plugin.EntrySet.__init__(self, fpattern, path,
- True, SGenshiTemplateFile)
+ properties, SGenshiTemplateFile)
fam.AddMonitor(path, self)
def HandleEvent(self, event):
+ '''passthrough event handler for old calling convention'''
if event.filename != self.path:
return self.handle_event(event)