Ticket #730 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

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:


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/     2009-05-07 02:42:41.000000000 +0000
+++ bcfg2-1.0pre5.local/src/lib/Server/Plugins/       2009-09-11 00:09:20.000000000 +0000
@@ -14,7 +14,7 @@
             raise Bcfg2.Server.Plugin.PluginExecutionError
         stream = self.template.generate(metadata=metadata,).filter( \
-        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 as well.


Change History

comment:1 Changed 14 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

Committed/fixed in [155b1a8d2f5345c0cf6e90b88a5094fd97feb9fb] (SVN r5429). Thanks for the patch.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.