From fa24dbb88f224075360f79e2c804c9ba4161652b Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 8 Nov 2011 21:27:05 +0000 Subject: [PATCH] merging current boost/python and libs/python from trunk into release branch [SVN r75414] --- pyste/src/Pyste/GCCXMLParser.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pyste/src/Pyste/GCCXMLParser.py b/pyste/src/Pyste/GCCXMLParser.py index b9a104c4..4a101720 100644 --- a/pyste/src/Pyste/GCCXMLParser.py +++ b/pyste/src/Pyste/GCCXMLParser.py @@ -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