Source: boost
Version: 1.34.1-11
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu intrepid ubuntu-patch

Hi,

The attached patch is used in Ubuntu to make it use the ElementTree
from the python2.5 standard library if available. Please consider
applying it.

Thanks,

James


Index: boost-1.34.1/libs/python/pyste/src/Pyste/GCCXMLParser.py
===================================================================
--- boost-1.34.1.orig/libs/python/pyste/src/Pyste/GCCXMLParser.py	2008-06-17 17:03:39.708172447 +0100
+++ boost-1.34.1/libs/python/pyste/src/Pyste/GCCXMLParser.py	2008-06-17 17:03:57.045639518 +0100
@@ -4,12 +4,16 @@
 # http:#www.boost.org/LICENSE_1_0.txt)
 
 from declarations import *
-# try to use cElementTree if avaiable
 try:
-    from cElementTree import ElementTree    
+	# try to use internal elementtree
+    from xml.etree.cElementTree import ElementTree
 except ImportError:
-    # fall back to the normal elementtree
-    from elementtree.ElementTree import ElementTree
+    # try to use cElementTree if avaiable
+    try:
+        from cElementTree import ElementTree    
+    except ImportError:
+        # fall back to the normal elementtree
+        from elementtree.ElementTree import ElementTree
 from xml.parsers.expat import ExpatError
 from copy import deepcopy
 from utils import enumerate

Reply via email to