[GRASS-SVN] r34782 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 7 07:01:20 EST 2008
Author: martinl
Date: 2008-12-07 07:01:20 -0500 (Sun, 07 Dec 2008)
New Revision: 34782
Modified:
grass/trunk/gui/wxpython/gui_modules/menudata.py
Log:
Fix ElementTree import for Python 2.4
Modified: grass/trunk/gui/wxpython/gui_modules/menudata.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menudata.py 2008-12-07 11:46:20 UTC (rev 34781)
+++ grass/trunk/gui/wxpython/gui_modules/menudata.py 2008-12-07 12:01:20 UTC (rev 34782)
@@ -18,7 +18,10 @@
"""
import os
-import xml.etree.ElementTree as etree
+try:
+ import xml.etree.ElementTree as etree
+except ImportError:
+ import elementtree.ElementTree as etree # Python <= 2.4
class Data:
'''Data object that returns menu descriptions to be used in wxgui.py.'''
More information about the grass-commit
mailing list