[GRASS-SVN] r42625 - grass/trunk/general/g.mapsets
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 21 18:43:16 EDT 2010
Author: martinl
Date: 2010-06-21 22:43:16 +0000 (Mon, 21 Jun 2010)
New Revision: 42625
Modified:
grass/trunk/general/g.mapsets/g.mapsets_picker.py
grass/trunk/general/g.mapsets/main.c
Log:
g.mapsets: simplify g.mapsets_picker.py
Modified: grass/trunk/general/g.mapsets/g.mapsets_picker.py
===================================================================
--- grass/trunk/general/g.mapsets/g.mapsets_picker.py 2010-06-21 22:39:52 UTC (rev 42624)
+++ grass/trunk/general/g.mapsets/g.mapsets_picker.py 2010-06-21 22:43:16 UTC (rev 42625)
@@ -104,19 +104,21 @@
self.curr_mapset = gisenv['MAPSET']
ret = grass.read_command('g.mapsets',
+ quiet = True,
flags = 'l',
- fs = '|')
+ fs = 'newline')
self.mapsets = []
if ret:
- self.mapsets = ret.rstrip('\n').split('|')
+ self.mapsets = ret.splitlines()
ret = grass.read_command('g.mapsets',
+ quiet = True,
flags = 'p',
- fs = '|')
+ fs = 'newline')
mapsets_access = []
if ret:
- mapsets_access = ret.rstrip('\n').split('|')
+ mapsets_access = ret.splitlines()
for mapset in self.mapsets:
index = self.InsertStringItem(sys.maxint, mapset)
Modified: grass/trunk/general/g.mapsets/main.c
===================================================================
--- grass/trunk/general/g.mapsets/main.c 2010-06-21 22:39:52 UTC (rev 42624)
+++ grass/trunk/general/g.mapsets/main.c 2010-06-21 22:43:16 UTC (rev 42625)
@@ -114,7 +114,6 @@
}
if (opt.dialog->answer) {
- putenv("GRASS_VERBOSE=0");
sprintf(path, "%s/etc/gui/scripts/g.mapsets_picker.py", G_gisbase());
G_spawn(getenv("GRASS_PYTHON"), "g.mapsets_picker.py", path, NULL);
}
More information about the grass-commit
mailing list