summaryrefslogtreecommitdiffstats
path: root/encap/src
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2007-02-25 22:31:57 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2007-02-25 22:31:57 +0000
commit6b9b3e30fb7a48efc3d4b5381d789b3e85d423d2 (patch)
tree632203b291e857ea8d5a5216cd4400e32c783b7f /encap/src
parent5f1f97799918c4a379f3e18ab6a60712364b49c3 (diff)
downloadbcfg2-6b9b3e30fb7a48efc3d4b5381d789b3e85d423d2.tar.gz
bcfg2-6b9b3e30fb7a48efc3d4b5381d789b3e85d423d2.tar.bz2
bcfg2-6b9b3e30fb7a48efc3d4b5381d789b3e85d423d2.zip
EncapPackages: Added updated XML.py diff (to force use of elementtree)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2880 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/src')
-rw-r--r--encap/src/encap-profiles/bcfg2-0.9.2.ep37
1 files changed, 37 insertions, 0 deletions
diff --git a/encap/src/encap-profiles/bcfg2-0.9.2.ep b/encap/src/encap-profiles/bcfg2-0.9.2.ep
index 6ac3b92df..4802c9bfe 100644
--- a/encap/src/encap-profiles/bcfg2-0.9.2.ep
+++ b/encap/src/encap-profiles/bcfg2-0.9.2.ep
@@ -70,6 +70,43 @@ url="http://encapsrcdist/mirror/bcfg/bcfg2-0.9.2.tar.gz
ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-0.9.2.tar.gz"
>
+<patch options="-p1"><![CDATA[
+Index: bcfg2/src/lib/Client/XML.py
+===================================================================
+--- bcfg2/src/lib/Client/XML.py (revision 2876)
++++ bcfg2/src/lib/Client/XML.py (working copy)
+@@ -4,23 +4,12 @@
+ # library will use lxml, then builtin xml.etree, then ElementTree
+
+ try:
+- from lxml.etree import Element, SubElement, XML, tostring
+- from lxml.etree import XMLSyntaxError as ParseError
+- driver = 'lxml'
++ from elementtree.ElementTree import Element, SubElement, XML, tostring
++ from xml.parsers.expat import ExpatError as ParseError
++ driver = 'etree'
+ except ImportError:
+- # lxml not available
+- try:
+- from xml.etree.ElementTree import Element, SubElement, XML, tostring
+- from xml.parsers.expat import ExpatError as ParseError
+- driver = 'etree-py'
+- except ImportError:
+- try:
+- from elementtree.ElementTree import Element, SubElement, 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"
+- raise SystemExit, 1
++ print "Failed to load elementtree.ElementTree"
++ print "Cannot continue"
++ raise SystemExit, 1
+
+ len([Element, SubElement, XML, tostring, ParseError])
+]]></patch>
+
<configure type="unset" />
<build>