diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-09-11 01:56:12 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-09-11 01:56:12 +0000 |
commit | 155b1a8d2f5345c0cf6e90b88a5094fd97feb9fb (patch) | |
tree | f2ecc8873c670071a1c780b7b82a2eef65a37b75 | |
parent | 243f3bbe6bfae638685eb550b018871eb356620f (diff) | |
download | bcfg2-155b1a8d2f5345c0cf6e90b88a5094fd97feb9fb.tar.gz bcfg2-155b1a8d2f5345c0cf6e90b88a5094fd97feb9fb.tar.bz2 bcfg2-155b1a8d2f5345c0cf6e90b88a5094fd97feb9fb.zip |
*Genshi: Don't strip whitespace (Resolves Ticket #730)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5429 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Plugins/SGenshi.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Plugins/TGenshi.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/SGenshi.py b/src/lib/Server/Plugins/SGenshi.py index 44791212f..6c06a25d0 100644 --- a/src/lib/Server/Plugins/SGenshi.py +++ b/src/lib/Server/Plugins/SGenshi.py @@ -14,7 +14,7 @@ class SGenshiTemplateFile(Bcfg2.Server.Plugins.TGenshi.TemplateFile): raise Bcfg2.Server.Plugin.PluginExecutionError stream = self.template.generate(metadata=metadata,).filter( \ Bcfg2.Server.Plugins.TGenshi.removecomment) - data = stream.render('xml') + data = stream.render('xml', strip_whitespace=False) return lxml.etree.XML(data) class SGenshiEntrySet(Bcfg2.Server.Plugin.EntrySet): diff --git a/src/lib/Server/Plugins/TGenshi.py b/src/lib/Server/Plugins/TGenshi.py index a28f5d08a..0d56f0189 100644 --- a/src/lib/Server/Plugins/TGenshi.py +++ b/src/lib/Server/Plugins/TGenshi.py @@ -72,13 +72,13 @@ class TemplateFile: else: ttypes = [TextTemplate] if True in [isinstance(self.template, t) for t in ttypes]: - textdata = stream.render('text') + textdata = stream.render('text', strip_whitespace=False) if type(textdata) == unicode: entry.text = textdata else: entry.text = unicode(textdata, self.encoding) else: - xmldata = stream.render('xml') + xmldata = stream.render('xml', strip_whitespace=False) if type(xmldata) == unicode: entry.text = xmldata else: |