]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Use Python 2.5's built-in ElementTree if possible
authorJason Kirtland <jek@discorporate.us>
Wed, 2 May 2007 20:12:33 +0000 (20:12 +0000)
committerJason Kirtland <jek@discorporate.us>
Wed, 2 May 2007 20:12:33 +0000 (20:12 +0000)
doc/build/read_markdown.py

index 363e7bf3e19d15e4618228ca94ece806aa530eab..35df7a5ce763030c4261877270cfd7db99319c16 100644 (file)
@@ -9,9 +9,12 @@ import sys, re, os
 from toc import TOCElement
 
 try:
-    import elementtree.ElementTree as et
-except:
-    raise "This module requires ElementTree to run (http://effbot.org/zone/element-index.htm)"
+    import xml.etree.ElementTree as et
+except ImportError:
+    try:
+        import elementtree.ElementTree as et
+    except:
+        raise "This module requires ElementTree to run (http://effbot.org/zone/element-index.htm)"
 
 import markdown