summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Base.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-11-28 21:39:04 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-11-28 21:39:04 +0000
commit7fcb71a1a06b4656b75bfa653b13667506cf5ed7 (patch)
treef28c8bb3a00c001d167dd72f5cd74ef21f67a395 /src/lib/Server/Plugins/Base.py
parente8246855ff91bb1735f998417e86ee12b3ea65b5 (diff)
downloadbcfg2-7fcb71a1a06b4656b75bfa653b13667506cf5ed7.tar.gz
bcfg2-7fcb71a1a06b4656b75bfa653b13667506cf5ed7.tar.bz2
bcfg2-7fcb71a1a06b4656b75bfa653b13667506cf5ed7.zip
switch to etree errors
(Logical change 1.368) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1552 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Base.py')
-rw-r--r--src/lib/Server/Plugins/Base.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Base.py b/src/lib/Server/Plugins/Base.py
index 0b912cb01..71719263f 100644
--- a/src/lib/Server/Plugins/Base.py
+++ b/src/lib/Server/Plugins/Base.py
@@ -2,8 +2,7 @@
__revision__ = '$Revision$'
from copy import deepcopy
-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, PluginInitError, SingleXMLFileBacked
@@ -27,7 +26,7 @@ class Base(Plugin, SingleXMLFileBacked):
'''Store XML data in reasonable structures'''
try:
xdata = XML(self.data)
- except ExpatError:
+ except XMLSyntaxError:
self.LogError("Failed to parse base.xml")
return
self.store = {'all':[], 'Class':{'all':[]}, 'Image':{'all':[]}, 'all':[]}