From b3991df79b0bdf25465de1f1b49f910d7f952258 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Wed, 2 Jul 2008 14:51:49 +0000 Subject: 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 --- src/lib/Server/Plugins/SGenshi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-1-g7c22