[GRASS-SVN] r42372 - grass/trunk/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 29 07:19:12 EDT 2010


Author: martinl
Date: 2010-05-29 07:19:12 -0400 (Sat, 29 May 2010)
New Revision: 42372

Modified:
   grass/trunk/lib/python/raster.py
Log:
pythonlib: don't ignore verbose/quiet/overwrite in mapcalc()


Modified: grass/trunk/lib/python/raster.py
===================================================================
--- grass/trunk/lib/python/raster.py	2010-05-29 11:18:21 UTC (rev 42371)
+++ grass/trunk/lib/python/raster.py	2010-05-29 11:19:12 UTC (rev 42372)
@@ -83,5 +83,11 @@
     """
     t = string.Template(exp)
     e = t.substitute(**kwargs)
-    if run_command('r.mapcalc', expression = e) != 0:
+    for key in kwargs.keys():
+        if key in ['overwrite', 'quiet', 'verbose']:
+            continue
+        del kwargs[key]
+    
+    if run_command('r.mapcalc', expression = e, **kwargs) != 0:
 	fatal("An error occurred while running r.mapcalc")
+    



More information about the grass-commit mailing list