Modify ↓
Ticket #730 (closed defect: fixed)
SGenshi strips whitespace
Reported by: | Leif Ryge <[email protected]…> | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.0.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
Genshi irritatingly strips whitespace when rendering templates, unless it is told not to. Bcfg2 should tell it not to, like this:
--- bcfg2-1.0pre5/src/lib/Server/Plugins/SGenshi.py 2009-05-07 02:42:41.000000000 +0000 +++ bcfg2-1.0pre5.local/src/lib/Server/Plugins/SGenshi.py 2009-09-11 00:09:20.000000000 +0000 @@ -14,7 +14,7 @@ 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):
This should probably be done in TGenshi.py as well.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
Committed/fixed in [155b1a8d2f5345c0cf6e90b88a5094fd97feb9fb] (SVN r5429). Thanks for the patch.