[GRASS-SVN] r41148 - grass/trunk/gui/wxpython/support
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 21 12:29:39 EST 2010
Author: martinl
Date: 2010-02-21 12:29:38 -0500 (Sun, 21 Feb 2010)
New Revision: 41148
Modified:
grass/trunk/gui/wxpython/support/update_menudata.py
Log:
wxGUI: update_menudata.py - write end of line
Modified: grass/trunk/gui/wxpython/support/update_menudata.py
===================================================================
--- grass/trunk/gui/wxpython/support/update_menudata.py 2010-02-21 15:26:19 UTC (rev 41147)
+++ grass/trunk/gui/wxpython/support/update_menudata.py 2010-02-21 17:29:38 UTC (rev 41148)
@@ -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.
@@ -110,8 +110,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