web/views/basetemplates.py
branchstable
changeset 4254 966f62e97c72
parent 4244 2c3de1953d00
child 4279 e6b9fd79a247
--- a/web/views/basetemplates.py	Mon Jan 18 15:58:06 2010 +0100
+++ b/web/views/basetemplates.py	Tue Jan 19 09:49:42 2010 +0100
@@ -267,7 +267,10 @@
             self.w(u'</tr></table>\n')
 
 if can_do_pdf_conversion():
-    from xml.etree.cElementTree import ElementTree
+    try:
+      from xml.etree.cElementTree import ElementTree
+    except ImportError: #python2.4
+        from elementtree import ElementTree
     from subprocess import Popen as sub
     from StringIO import StringIO
     from tempfile import NamedTemporaryFile