[GRASS-SVN] r73009 - grass/trunk/scripts/r.drain

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 27 01:33:51 PDT 2018


Author: mmetz
Date: 2018-07-27 01:33:51 -0700 (Fri, 27 Jul 2018)
New Revision: 73009

Modified:
   grass/trunk/scripts/r.drain/r.drain.py
Log:
r.drain: ignore values option if raster values are not used (no -c or -a flag)

Modified: grass/trunk/scripts/r.drain/r.drain.py
===================================================================
--- grass/trunk/scripts/r.drain/r.drain.py	2018-07-27 08:19:51 UTC (rev 73008)
+++ grass/trunk/scripts/r.drain/r.drain.py	2018-07-27 08:33:51 UTC (rev 73009)
@@ -147,7 +147,8 @@
     # create args for r.path
     kwargs = {}
     kwargs['input'] = dirmap
-    kwargs['values'] = valmap
+    if flags['c'] or flags['a']:
+        kwargs['values'] = valmap
     kwargs['format'] = 'degree'
     if start_coords:
         kwargs['start_coordinates'] = start_coords



More information about the grass-commit mailing list