summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Bundler.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Plugins/Bundler.py')
-rw-r--r--src/lib/Server/Plugins/Bundler.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Bundler.py b/src/lib/Server/Plugins/Bundler.py
index c602dceb7..86c52b9e2 100644
--- a/src/lib/Server/Plugins/Bundler.py
+++ b/src/lib/Server/Plugins/Bundler.py
@@ -3,8 +3,7 @@ __revision__ = '$Revision$'
from copy import deepcopy
from syslog import LOG_ERR, syslog
-from lxml.etree import Element, XML
-from xml.parsers.expat import ExpatError
+from lxml.etree import Element, XML, XMLSyntaxError
from Bcfg2.Server.Plugin import Plugin, SingleXMLFileBacked, XMLFileBacked, DirectoryBacked
@@ -19,7 +18,7 @@ class ImageFile(SingleXMLFileBacked):
'''Build data structures out of the data'''
try:
xdata = XML(self.data)
- except ExpatError, err:
+ except XMLSyntaxError, err:
syslog(LOG_ERR, "Failed to parse file %s" % (self.name))
syslog(LOG_ERR, err)
del self.data
@@ -43,7 +42,7 @@ class Bundle(XMLFileBacked):
'''Build data structures from the source data'''
try:
xdata = XML(self.data)
- except ExpatError, err:
+ except XMLSyntaxError, err:
syslog(LOG_ERR, "Failed to parse file %s" % (self.name))
syslog(LOG_ERR, str(err))
del self.data