[GRASS-SVN] r68258 - grass/trunk/gui/wxpython/datacatalog

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 13 06:26:21 PDT 2016


Author: annakrat
Date: 2016-04-13 06:26:21 -0700 (Wed, 13 Apr 2016)
New Revision: 68258

Modified:
   grass/trunk/gui/wxpython/datacatalog/tree.py
Log:
wxGUI/catalog: fix crashing when mapset has space in name

Modified: grass/trunk/gui/wxpython/datacatalog/tree.py
===================================================================
--- grass/trunk/gui/wxpython/datacatalog/tree.py	2016-04-13 12:46:16 UTC (rev 68257)
+++ grass/trunk/gui/wxpython/datacatalog/tree.py	2016-04-13 13:26:21 UTC (rev 68258)
@@ -61,13 +61,13 @@
     elements = ['raster', 'raster_3d', 'vector']
     try:
         if not mapsets:
-            mapsets = gscript.read_command('g.mapsets', flags='l', quiet=True, env=env).strip()
+            mapsets = gscript.read_command('g.mapsets', flags='l', separator='comma', quiet=True, env=env).strip()
     except CalledModuleError:
         queue.put((maps_dict, _("Failed to read mapsets from location <{l}>.").format(l=location)))
         gscript.try_remove(tmp_gisrc_file)
         return
     else:
-        listOfMapsets = mapsets.split()
+        listOfMapsets = mapsets.split(',')
         Debug.msg(4, "Location <{}>: {} mapsets found".format(location, len(listOfMapsets)))
         for each in listOfMapsets:
             maps_dict[each] = {}
@@ -249,7 +249,7 @@
                 location_nodes = []
 
         if errors:
-            GWarning('\n'.join(errors))
+            wx.CallAfter(GWarning, '\n'.join(errors))
         Debug.msg(1, "Tree filled")
         self.RefreshItems()
 



More information about the grass-commit mailing list