Browse Source

Fix ElementTree import for Python 2.4

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34782 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 16 years ago
parent
commit
0933055319
1 changed files with 4 additions and 1 deletions
  1. 4 1
      gui/wxpython/gui_modules/menudata.py

+ 4 - 1
gui/wxpython/gui_modules/menudata.py

@@ -18,7 +18,10 @@ for details.
 """
 
 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.'''