diff options
Diffstat (limited to 'src/lib/Server')
-rw-r--r-- | src/lib/Server/Plugins/SGenshi.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/SGenshi.py b/src/lib/Server/Plugins/SGenshi.py index 3745834a8..f6a98c141 100644 --- a/src/lib/Server/Plugins/SGenshi.py +++ b/src/lib/Server/Plugins/SGenshi.py @@ -7,6 +7,7 @@ import lxml.etree import logging import copy import sys +import os.path import Bcfg2.Server.Plugin import Bcfg2.Server.Plugins.TGenshi @@ -29,7 +30,7 @@ class SGenshiTemplateFile(Bcfg2.Server.Plugins.TGenshi.TemplateFile, stream = self.template.generate(metadata=metadata).filter( \ Bcfg2.Server.Plugins.TGenshi.removecomment) data = lxml.etree.XML(stream.render('xml', strip_whitespace=False)) - bundlename = self.name.split('/')[-1][:-4] + bundlename = os.path.splitext(os.path.basename(self.name))[0] bundle = lxml.etree.Element('Bundle', name=bundlename) for item in self.Match(metadata, data): bundle.append(copy.deepcopy(item)) |