[GRASS-SVN] r47249 - grass/trunk/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 26 11:41:28 EDT 2011


Author: martinl
Date: 2011-07-26 08:41:28 -0700 (Tue, 26 Jul 2011)
New Revision: 47249

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


Modified: grass/trunk/gui/wxpython/gis_set.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set.py	2011-07-26 15:40:43 UTC (rev 47248)
+++ grass/trunk/gui/wxpython/gis_set.py	2011-07-26 15:41:28 UTC (rev 47249)
@@ -592,19 +592,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