[GRASS-SVN] r69567 - grass-addons/grass7/temporal/t.rast.whatcsv
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 23 14:01:11 PDT 2016
Author: neteler
Date: 2016-09-23 14:01:11 -0700 (Fri, 23 Sep 2016)
New Revision: 69567
Modified:
grass-addons/grass7/temporal/t.rast.whatcsv/t.rast.whatcsv.py
Log:
t.rast.whatcsv addon: replace non-existent SimpleModule() with gcore.read_command()
Modified: grass-addons/grass7/temporal/t.rast.whatcsv/t.rast.whatcsv.py
===================================================================
--- grass-addons/grass7/temporal/t.rast.whatcsv/t.rast.whatcsv.py 2016-09-23 20:03:14 UTC (rev 69566)
+++ grass-addons/grass7/temporal/t.rast.whatcsv/t.rast.whatcsv.py 2016-09-23 21:01:11 UTC (rev 69567)
@@ -81,9 +81,9 @@
import copy
import csv
import grass.script as gscript
+from grass.script import core as gcore
import grass.temporal as tgis
import grass.pygrass.modules as pymod
-from grass.gunittest.gmodules import SimpleModule
############################################################################
@@ -127,10 +127,12 @@
separator = "\n"
- r_what = SimpleModule("r.what", map="dummy",
+ r_what = gcore.read_command("r.what", map="dummy",
output="-",
separator=separator,
quiet=True)
+ if len(s) == 0:
+ gcore.fatal(_('No data returned from query'))
reader = csv.reader(open(csv_file, "r"), delimiter=separator)
More information about the grass-commit
mailing list