summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/SGenshi.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-05-04 20:48:00 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-05-04 20:48:00 +0000
commit3d054585fab3919a7f61ac7776e3b3d0cf5fc71a (patch)
tree54b0d7d0f3e528691307b8b04dc0c9cc6daa87ee /src/lib/Server/Plugins/SGenshi.py
parenta651c7b5e3d5defda2dba7055c04d405dd7c769c (diff)
downloadbcfg2-3d054585fab3919a7f61ac7776e3b3d0cf5fc71a.tar.gz
bcfg2-3d054585fab3919a7f61ac7776e3b3d0cf5fc71a.tar.bz2
bcfg2-3d054585fab3919a7f61ac7776e3b3d0cf5fc71a.zip
SGenshi: Fix error handling in case of template errors
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4591 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/SGenshi.py')
-rw-r--r--src/lib/Server/Plugins/SGenshi.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/SGenshi.py b/src/lib/Server/Plugins/SGenshi.py
index fb3e3f6f4..10559733c 100644
--- a/src/lib/Server/Plugins/SGenshi.py
+++ b/src/lib/Server/Plugins/SGenshi.py
@@ -3,6 +3,7 @@ __revision__ = '$Revision$'
import Bcfg2.Server.Plugin, Bcfg2.Server.Plugins.TGenshi
import lxml.etree, logging
+import genshi.template
logger = logging.getLogger('Bcfg2.Plugins.SGenshi')
@@ -38,7 +39,8 @@ class SGenshiEntrySet(Bcfg2.Server.Plugin.EntrySet):
for entry in self.get_matching(metadata):
try:
ret.append(entry.get_xml_value(metadata))
- except Bcfg2.Server.Plugin.PluginExecutionError:
+ except genshi.template.TemplateError, terror:
+ logger.error('Genshi template error: %s' % terror)
logger.error("SGenshi: Failed to template file %s" % entry.name)
return ret