diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-04-16 18:47:08 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-04-16 18:47:08 +0000 |
commit | e5741b35538a80451f1dfadb47abebb1723ef532 (patch) | |
tree | 0bf286e249656f909fc4394c6d1a7a2af145dae0 /src/lib/Server | |
parent | 6310bb96580eb9f110472d72c85c918df552fb61 (diff) | |
download | bcfg2-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')
-rw-r--r-- | src/lib/Server/Plugins/SGenshi.py | 9 |
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) |