diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-11-28 21:39:04 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-11-28 21:39:04 +0000 |
commit | 7fcb71a1a06b4656b75bfa653b13667506cf5ed7 (patch) | |
tree | f28c8bb3a00c001d167dd72f5cd74ef21f67a395 /src/lib/Server/Plugins/Base.py | |
parent | e8246855ff91bb1735f998417e86ee12b3ea65b5 (diff) | |
download | bcfg2-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.py | 5 |
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':[]} |