Import ElementTree in libbe.util.utility for InvalidXML.
authorW. Trevor King <wking@drexel.edu>
Sat, 16 Apr 2011 19:17:33 +0000 (15:17 -0400)
committerW. Trevor King <wking@drexel.edu>
Sat, 16 Apr 2011 19:17:33 +0000 (15:17 -0400)
libbe/util/utility.py

index 3f9a1b0c49fa97fa451477c92507b2939a10333e..4fe906ef808f86345e6c6a0cb26ffee0e5ca156e 100644 (file)
@@ -28,6 +28,10 @@ import shutil
 import tempfile
 import time
 import types
+try: # import core module, Python >= 2.5
+    from xml.etree import ElementTree
+except ImportError: # look for non-core module
+    from elementtree import ElementTree
 
 import libbe
 if libbe.TESTING == True: