summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorMike McCallister <mike@mccllstr.com>2011-10-15 01:10:10 -0500
committerMike McCallister <mike@mccllstr.com>2011-10-15 01:10:10 -0500
commit4a30b32594c0457776dd0598dcb99cb935245aee (patch)
tree3e060423bd9efc920f99d359d1ce7437f80d375d /src/lib/Server/Plugins
parent33bae47a63cd0b174b5c6152ca6efccd03057b5e (diff)
downloadbcfg2-4a30b32594c0457776dd0598dcb99cb935245aee.tar.gz
bcfg2-4a30b32594c0457776dd0598dcb99cb935245aee.tar.bz2
bcfg2-4a30b32594c0457776dd0598dcb99cb935245aee.zip
Implement the preceeding change for SGenshi, too.
This is where the mistaken Bundle names were being generated.
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/SGenshi.py3
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))