From 61522488c3fa39148913946c62f749c53f1f75d1 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 3 Jan 2013 13:41:54 -0600 Subject: StructFile: removed unnecessary exception handling in Index() --- src/lib/Bcfg2/Server/Plugin/helpers.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/lib/Bcfg2') 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 -- cgit v1.2.3-1-g7c22