[GRASS-SVN] r41150 - grass/branches/develbranch_6/gui/wxpython/support

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 21 12:34:03 EST 2010


Author: martinl
Date: 2010-02-21 12:34:03 -0500 (Sun, 21 Feb 2010)
New Revision: 41150

Modified:
   grass/branches/develbranch_6/gui/wxpython/support/update_menudata.py
Log:
wxGUI: update_menudata.py - write end of line
(merge r41148 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/support/update_menudata.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/support/update_menudata.py	2010-02-21 17:32:08 UTC (rev 41149)
+++ grass/branches/develbranch_6/gui/wxpython/support/update_menudata.py	2010-02-21 17:34:03 UTC (rev 41150)
@@ -7,7 +7,7 @@
 
 Prints warning for missing modules.
 
-(C) 2008-2009 by the GRASS Development Team
+(C) 2008-2010 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS
 for details.
@@ -105,8 +105,17 @@
         data.tree.write(file)
     except IOError:
         print >> sys.stderr, "'%s' not found. Please run the script from 'gui/wxpython'." % file
-        
-
+        return
+    
+    try:
+        f = open(file, 'a')
+        try:
+            f.write('\n')
+        finally:
+            f.close()
+    except IOError:
+        print >> sys.stderr, "ERROR: Unable to write to menudata file."
+    
 def main(argv = None):
     if argv is None:
         argv = sys.argv



More information about the grass-commit mailing list