diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-08-14 15:14:17 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-08-14 15:14:17 +0000 |
commit | aed32c5e04799925c309a802f8c802e238ccdb4d (patch) | |
tree | ab1d2e616d045522b83c13c72dca3aa8a968975c /src/lib/Client/XML.py | |
parent | c00b6f4350b389968ac28b3bd77d1d0d6b24be54 (diff) | |
download | bcfg2-aed32c5e04799925c309a802f8c802e238ccdb4d.tar.gz bcfg2-aed32c5e04799925c309a802f8c802e238ccdb4d.tar.bz2 bcfg2-aed32c5e04799925c309a802f8c802e238ccdb4d.zip |
* Annotate Bcfg2.Client.XML driver
* Switch Toolset.py to use XML abstraction layer
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2063 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/XML.py')
-rw-r--r-- | src/lib/Client/XML.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Client/XML.py b/src/lib/Client/XML.py index 356886558..b0ae0f771 100644 --- a/src/lib/Client/XML.py +++ b/src/lib/Client/XML.py @@ -6,15 +6,18 @@ __revision__ = '$Revision$' try: from lxml.etree import Element, SubElement, tostring from lxml.etree import XMLSyntaxError as ParseError + driver = 'lxml' except ImportError: # lxml not available try: from xml.etree.ElementTree import Element, XML, tostring from xml.parsers.expat import ExpatError as ParseError + driver = 'etree-py' except ImportError: try: from elementtree.ElementTree import Element, XML, tostring from xml.parsers.expat import ExpatError as ParseError + driver = 'etree' except ImportError: print "Failed to load lxml, xml.etree and elementtree.ElementTree" print "Cannot continue" |