[GRASS-SVN] r38531 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 29 03:07:24 EDT 2009


Author: martinl
Date: 2009-07-29 03:07:23 -0400 (Wed, 29 Jul 2009)
New Revision: 38531

Modified:
   grass/trunk/lib/init/grass.py
Log:
don't crash when .grassrc7 is missing


Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2009-07-28 15:35:26 UTC (rev 38530)
+++ grass/trunk/lib/init/grass.py	2009-07-29 07:07:23 UTC (rev 38531)
@@ -194,11 +194,11 @@
 	# Check for a reference to the GRASS user interface in the grassrc file
 	if os.access(gisrc, os.R_OK):
 	    kv = read_gisrc()
-	    if 'GRASS_GUI' not in kv:
+	    if not kv.has_key('GRASS_GUI'):
 		# Set the GRASS user interface to the default if needed
 		grass_gui = default_gui
-        else:
-            grass_gui = kv['GRASS_GUI']
+            else:
+                grass_gui = kv['GRASS_GUI']
     
     if not grass_gui:
 	grass_gui = default_gui



More information about the grass-commit mailing list