[GRASS-SVN] r47248 - grass/branches/develbranch_6/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 26 11:40:43 EDT 2011


Author: martinl
Date: 2011-07-26 08:40:43 -0700 (Tue, 26 Jul 2011)
New Revision: 47248

Modified:
   grass/branches/develbranch_6/gui/wxpython/gis_set.py
Log:
wxGUI/welcome: fix g.mapset output parsing
	       (merge r47247 from relbr64)


Modified: grass/branches/develbranch_6/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gis_set.py	2011-07-26 15:36:56 UTC (rev 47247)
+++ grass/branches/develbranch_6/gui/wxpython/gis_set.py	2011-07-26 15:40:43 UTC (rev 47248)
@@ -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