[GRASS-SVN] r35854 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 11 13:15:20 EST 2009


Author: martinl
Date: 2009-02-11 13:15:20 -0500 (Wed, 11 Feb 2009)
New Revision: 35854

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py
Log:
Quit wxGUI gracefully when g.region crashes (trac #493)
    (merge from trunk, r35852)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py	2009-02-11 18:12:46 UTC (rev 35853)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py	2009-02-11 18:15:20 UTC (rev 35854)
@@ -646,10 +646,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 cmdRegion.ReadStdOutput():
             key, val = reg.split("=", 1)
             try:



More information about the grass-commit mailing list