summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-07-02 14:51:49 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-07-02 14:51:49 +0000
commitb3991df79b0bdf25465de1f1b49f910d7f952258 (patch)
tree952adad63ee792c4da7ef6af67ff1413325c047f /src
parent94a8aae44457c90e1fcba8f2d8180d0b1326a54a (diff)
downloadbcfg2-b3991df79b0bdf25465de1f1b49f910d7f952258.tar.gz
bcfg2-b3991df79b0bdf25465de1f1b49f910d7f952258.tar.bz2
bcfg2-b3991df79b0bdf25465de1f1b49f910d7f952258.zip
Add encoding support for SGenshi (patch from solj) (Resolves Ticket #571)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4744 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/SGenshi.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/SGenshi.py b/src/lib/Server/Plugins/SGenshi.py
index bf063b884..3a98d79fa 100644
--- a/src/lib/Server/Plugins/SGenshi.py
+++ b/src/lib/Server/Plugins/SGenshi.py
@@ -16,7 +16,7 @@ class SGenshiTemplateFile(Bcfg2.Server.Plugins.TGenshi.TemplateFile):
return lxml.etree.XML(data)
class SGenshiEntrySet(Bcfg2.Server.Plugin.EntrySet):
- def __init__(self, path, fam):
+ def __init__(self, path, fam, encoding):
fpattern = '\S+\.xml'
try:
properties = Bcfg2.Server.Plugin.TemplateProperties( \
@@ -24,8 +24,8 @@ class SGenshiEntrySet(Bcfg2.Server.Plugin.EntrySet):
except:
properties = Bcfg2.Server.Plugin.FakeProperties()
- Bcfg2.Server.Plugin.EntrySet.__init__(self, fpattern, path,
- properties, SGenshiTemplateFile)
+ Bcfg2.Server.Plugin.EntrySet.__init__(self, fpattern, path, properties
+ SGenshiTemplateFile, encoding)
fam.AddMonitor(path, self)
def HandleEvent(self, event):
@@ -53,7 +53,7 @@ class SGenshi(SGenshiEntrySet, Bcfg2.Server.Plugin.StructurePlugin):
def __init__(self, core, datastore):
Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore)
try:
- SGenshiEntrySet.__init__(self, self.data, self.core.fam)
+ SGenshiEntrySet.__init__(self, self.data, self.core.fam, core.encoding)
except:
logger.error("Failed to load SGenshi repository; disabling SGenshi")
raise Bcfg2.Server.Plugin.PluginInitError