[GRASS-SVN] r72503 - grass/branches/releasebranch_7_2/lib/python/temporal
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 22 10:43:59 PDT 2018
Author: lucadelu
Date: 2018-03-22 10:43:59 -0700 (Thu, 22 Mar 2018)
New Revision: 72503
Modified:
grass/branches/releasebranch_7_2/lib/python/temporal/list_stds.py
Log:
python temporal: solved bug with column=name with method=comma #2790, backport of r72403
Modified: grass/branches/releasebranch_7_2/lib/python/temporal/list_stds.py
===================================================================
--- grass/branches/releasebranch_7_2/lib/python/temporal/list_stds.py 2018-03-22 16:55:40 UTC (rev 72502)
+++ grass/branches/releasebranch_7_2/lib/python/temporal/list_stds.py 2018-03-22 17:43:59 UTC (rev 72503)
@@ -245,7 +245,8 @@
else:
# In comma separated mode only map ids are needed
if method == "comma":
- columns = "id"
+ if columns not in ['id', 'name']:
+ columns = "id"
rows = sp.get_registered_maps(columns, where, order, dbif)
@@ -255,9 +256,9 @@
count = 0
for row in rows:
if count == 0:
- string += row["id"]
+ string += row[columns]
else:
- string += ",%s" % row["id"]
+ string += ",%s" % row[columns]
count += 1
if outpath:
outfile.write('{st}\n'.format(st=string))
More information about the grass-commit
mailing list