[GRASS-SVN] r47247 - grass/branches/releasebranch_6_4/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 26 11:36:56 EDT 2011


Author: martinl
Date: 2011-07-26 08:36:56 -0700 (Tue, 26 Jul 2011)
New Revision: 47247

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py
Log:
wxGUI/welcome: fix g.mapset output parsing


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py	2011-07-26 14:46:39 UTC (rev 47246)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gis_set.py	2011-07-26 15:36:56 UTC (rev 47247)
@@ -594,19 +594,16 @@
         # disable mapset with denied permission
         locationName = os.path.basename(location)
         
-        try:
-            ret = gcmd.RunCommand('g.mapset',
-                                  read = True,
-                                  flags = 'l',
-                                  location = locationName,
-                                  gisdbase = self.gisdbase)
+        ret = gcmd.RunCommand('g.mapset',
+                              read = True,
+                              flags = 'l',
+                              location = locationName,
+                              gisdbase = self.gisdbase)
             
-            if ret == '':
-                GError(_("No mapsets available in location <%s>") % locationName)
-            
+        if ret:
             for line in ret.splitlines():
                 self.listOfMapsetsSelectable += line.split(' ')
-        except:
+        else:
             gcmd.RunCommand("g.gisenv",
                             set = "GISDBASE=%s" % self.gisdbase)
             gcmd.RunCommand("g.gisenv",



More information about the grass-commit mailing list