[GRASS-SVN] r64236 - grass/trunk/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 19 01:45:48 PST 2015
Author: martinl
Date: 2015-01-19 01:45:47 -0800 (Mon, 19 Jan 2015)
New Revision: 64236
Modified:
grass/trunk/gui/wxpython/lmgr/datacatalog.py
Log:
wxGUI/datacatalog: fix failure when mapsets are not readable
Modified: grass/trunk/gui/wxpython/lmgr/datacatalog.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/datacatalog.py 2015-01-19 09:29:02 UTC (rev 64235)
+++ grass/trunk/gui/wxpython/lmgr/datacatalog.py 2015-01-19 09:45:47 UTC (rev 64236)
@@ -117,9 +117,14 @@
varloc = self.AppendItem(self.root, loc)
# add all mapsets
- for mapset in ListOfMapsets():
- self.AppendItem(varloc, mapset)
-
+ mapsets = ListOfMapsets()
+ if mapsets:
+ for mapset in mapsets:
+ self.AppendItem(varloc, mapset)
+ else:
+ self.AppendItem(varloc, _("No mapsets readable"))
+ continue
+
# get list of all maps in location
maplist = RunCommand('g.list', flags='mt', type='raster,raster_3d,vector', mapset=','.join(mapsets),
quiet=True, read=True)
More information about the grass-commit
mailing list