[GRASS-SVN] r35852 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 11 13:10:05 EST 2009
Author: martinl
Date: 2009-02-11 13:10:05 -0500 (Wed, 11 Feb 2009)
New Revision: 35852
Modified:
grass/trunk/gui/wxpython/gui_modules/render.py
Log:
Quit wxGUI gracefully when g.region crashes (trac #493)
Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py 2009-02-11 06:37:33 UTC (rev 35851)
+++ grass/trunk/gui/wxpython/gui_modules/render.py 2009-02-11 18:10:05 UTC (rev 35852)
@@ -624,10 +624,16 @@
elif vect:
e.message = _("Unable to zoom to vector map <%s>.") % vect[0] + \
'%s%s' % (os.linesep, os.linesep) + e.message
+ else:
+ e.message = _("Unable to get current geographic extent. "
+ "Force quiting wxGUI. Please run manually g.region to "
+ "fix the problem.")
+ e.Show()
+ if not rast and not vect:
+ sys.exit(1)
+ else:
+ return self.region
- print >> sys.stderr, e
- return self.region
-
for reg in ret.splitlines():
key, val = reg.split("=", 1)
try:
More information about the grass-commit
mailing list