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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 14 17:10:06 EDT 2010


Author: martinl
Date: 2010-03-14 17:10:06 -0400 (Sun, 14 Mar 2010)
New Revision: 41441

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py
Log:
Quit wxGUI when GRASS is not running


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py	2010-03-14 19:11:09 UTC (rev 41440)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py	2010-03-14 21:10:06 UTC (rev 41441)
@@ -458,6 +458,9 @@
     def GetWindow(self):
         """Read WIND file and set up self.wind dictionary"""
         # FIXME: duplicated region WIND == g.region (at least some values)
+        if not self.env.has_key('GISDBASE'):
+            sys.exit(_("Quit wxGUI. GRASS is not running."))
+        
         filename = os.path.join (self.env['GISDBASE'],
                                  self.env['LOCATION_NAME'],
                                  self.env['MAPSET'],



More information about the grass-commit mailing list