summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-01-03 13:41:54 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-01-03 13:41:54 -0600
commit61522488c3fa39148913946c62f749c53f1f75d1 (patch)
treef1b679b624425495015150c67892571e6091de94
parenta76beb68a5daaa2caf68015c578d92ca824e6c0c (diff)
downloadbcfg2-61522488c3fa39148913946c62f749c53f1f75d1.tar.gz
bcfg2-61522488c3fa39148913946c62f749c53f1f75d1.tar.bz2
bcfg2-61522488c3fa39148913946c62f749c53f1f75d1.zip
StructFile: removed unnecessary exception handling in Index()
-rw-r--r--src/lib/Bcfg2/Server/Plugin/helpers.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py
index 641e14f9b..5922df51e 100644
--- a/src/lib/Bcfg2/Server/Plugin/helpers.py
+++ b/src/lib/Bcfg2/Server/Plugin/helpers.py
@@ -14,7 +14,7 @@ import Bcfg2.Statistics
from Bcfg2.Compat import CmpMixin, wraps
from Bcfg2.Server.Plugin.base import Debuggable, Plugin
from Bcfg2.Server.Plugin.interfaces import Generator
-from Bcfg2.Server.Plugin.exceptions import SpecificityError, PluginInitError, \
+from Bcfg2.Server.Plugin.exceptions import SpecificityError, \
PluginExecutionError
try:
@@ -530,14 +530,8 @@ class XMLFileBacked(FileBacked):
LOGGER.warning(msg)
def Index(self):
- try:
- self.xdata = lxml.etree.XML(self.data, base_url=self.name,
- parser=Bcfg2.Server.XMLParser)
- except lxml.etree.XMLSyntaxError:
- msg = "Failed to parse %s: %s" % (self.name, sys.exc_info()[1])
- LOGGER.error(msg)
- raise PluginInitError(msg)
-
+ self.xdata = lxml.etree.XML(self.data, base_url=self.name,
+ parser=Bcfg2.Server.XMLParser)
self._follow_xincludes()
if self.extras:
try:
@@ -1082,7 +1076,7 @@ class SpecificData(object):
:param event: The event that applies to this file
:type event: Bcfg2.Server.FileMonitor.Event
:returns: None
- :raises: Bcfg2.Server.Plugin.exceptions.PluginExecutionError
+ :raises: :exc:`Bcfg2.Server.Plugin.exceptions.PluginExecutionError`
"""
if event.code2str() == 'deleted':
return