[GRASS-SVN] r35853 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 11 13:12:46 EST 2009


Author: martinl
Date: 2009-02-11 13:12:46 -0500 (Wed, 11 Feb 2009)
New Revision: 35853

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2009-02-11 18:10:05 UTC (rev 35852)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2009-02-11 18:12:46 UTC (rev 35853)
@@ -644,10 +644,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