[GRASS-SVN] r72403 - grass/trunk/lib/python/temporal

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 20 04:34:11 PDT 2018


Author: lucadelu
Date: 2018-03-20 04:34:11 -0700 (Tue, 20 Mar 2018)
New Revision: 72403

Modified:
   grass/trunk/lib/python/temporal/list_stds.py
Log:
python temporal: fix #2790

Modified: grass/trunk/lib/python/temporal/list_stds.py
===================================================================
--- grass/trunk/lib/python/temporal/list_stds.py	2018-03-20 11:00:17 UTC (rev 72402)
+++ grass/trunk/lib/python/temporal/list_stds.py	2018-03-20 11:34:11 UTC (rev 72403)
@@ -250,7 +250,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)
 
@@ -260,9 +261,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