[GRASS-SVN] r32899 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 19 14:54:48 EDT 2008
Author: martinl
Date: 2008-08-19 14:54:48 -0400 (Tue, 19 Aug 2008)
New Revision: 32899
Modified:
grass/trunk/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI: don't crash when no vector is in the current mapset
(merge from devbr6, r32898)
Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2008-08-19 18:51:31 UTC (rev 32898)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2008-08-19 18:54:48 UTC (rev 32899)
@@ -128,8 +128,13 @@
cmd.append("%s=%s" % (cmdDef[1], outmap))
+ try:
+ listOfVector = grass.list_grouped('vect')[grass.gisenv()['MAPSET']]
+ except KeyError:
+ listOfVectors = []
+
if not UserSettings.Get(group='cmd', key='overwrite', subkey='enabled') and \
- outmap in grass.list_grouped('vect')[grass.gisenv()['MAPSET']]:
+ outmap in listOfVectors:
dlg = wx.MessageDialog(parent, message=_("Vector map <%s> already exists "
"in the current mapset. "
"Do you want to overwrite it?") % outmap,
More information about the grass-commit
mailing list