[GRASS-SVN] r39918 - grass/trunk/gui/wxpython/support

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 6 06:24:34 EST 2009


Author: martinl
Date: 2009-12-06 06:24:34 -0500 (Sun, 06 Dec 2009)
New Revision: 39918

Modified:
   grass/trunk/gui/wxpython/support/update_menudata.py
Log:
print error message when menudata.xml is not found


Modified: grass/trunk/gui/wxpython/support/update_menudata.py
===================================================================
--- grass/trunk/gui/wxpython/support/update_menudata.py	2009-12-06 11:18:58 UTC (rev 39917)
+++ grass/trunk/gui/wxpython/support/update_menudata.py	2009-12-06 11:24:34 UTC (rev 39918)
@@ -103,11 +103,13 @@
     
 def writeData(data):
     """!Write updated menudata.xml"""
-    file = os.path.join('..', 'xml', 'menudata.xml')
+    file = os.path.join('xml', 'menudata.xml')
     try:
+        if not os.path.exists(file):
+            raise IOError
         data.tree.write(file)
     except IOError:
-        print >> sys.stderr, "'menudata.xml' not found. Please run the script from 'gui/wxpython/support'."
+        print >> sys.stderr, "'%s' not found. Please run the script from 'gui/wxpython'." % file
         
 
 def main(argv = None):



More information about the grass-commit mailing list