[GRASS-SVN] r40085 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 20 07:35:46 EST 2009


Author: martinl
Date: 2009-12-20 07:35:46 -0500 (Sun, 20 Dec 2009)
New Revision: 40085

Modified:
   grass/trunk/gui/wxpython/gui_modules/preferences.py
Log:
don't fail if GRASS_PROJSHARE is not defined


Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2009-12-20 12:25:02 UTC (rev 40084)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2009-12-20 12:35:46 UTC (rev 40085)
@@ -1,4 +1,4 @@
-"""
+"""!
 @package preferences
 
 @brief User preferences dialog
@@ -49,6 +49,11 @@
         #
         self.sep = ';'
 
+        try:
+            projFile = utils.PathJoin(os.environ["GRASS_PROJSHARE"], 'epsg')
+        except KeyError:
+            projFile = ''
+        
         #
         # default settings
         #
@@ -119,7 +124,7 @@
                 'statusbar' : {
                     'proj4'    : '',
                     'epsg'     : '',
-                    'projFile' : utils.PathJoin(os.environ["GRASS_PROJSHARE"], 'epsg'),
+                    'projFile' : projFile,
                     },
                 'format' : {
                     'll'  : 'DMS',



More information about the grass-commit mailing list