Przeglądaj źródła

pythonlib: don't ignore verbose/quiet/overwrite in mapcalc()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42372 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 lat temu
rodzic
commit
d4ebc0bb76
1 zmienionych plików z 7 dodań i 1 usunięć
  1. 7 1
      lib/python/raster.py

+ 7 - 1
lib/python/raster.py

@@ -83,5 +83,11 @@ def mapcalc(exp, **kwargs):
     """
     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")
+