Hi devs,

it seems no possible to use -qq flag in the scripting library to run modules.

I attach a diff, please let me know if it make sense and If I can submit it.

-- 
ciao
Luca

www.lucadelu.org
Index: lib/python/script/core.py
===================================================================
--- lib/python/script/core.py   (revision 70379)
+++ lib/python/script/core.py   (working copy)
@@ -264,7 +264,7 @@
 
 
 def make_command(prog, flags=b"", overwrite=False, quiet=False, verbose=False,
-                 errors=None, **options):
+                 superquiet=False, errors=None, **options):
     """Return a list of strings suitable for use as the args parameter to
     Popen() or call(). Example:
 
@@ -289,6 +289,8 @@
         args.append(b"--q")
     if verbose:
         args.append(b"--v")
+    if superquiet:
+        args.append(b"--qq")
     if flags:
         flags = _make_val(flags)
         if b'-' in flags:
@@ -330,7 +332,7 @@
                                 returncode=returncode)
 
 def start_command(prog, flags=b"", overwrite=False, quiet=False,
-                  verbose=False, **kwargs):
+                  verbose=False, superquiet=False, **kwargs):
     """Returns a Popen object with the command created by make_command.
     Accepts any of the arguments which Popen() accepts apart from "args"
     and "shell".
@@ -550,7 +552,7 @@
 
 
 def exec_command(prog, flags="", overwrite=False, quiet=False, verbose=False,
-                 env=None, **kwargs):
+                 superquiet=False, env=None, **kwargs):
     """Interface to os.execvpe(), but with the make_command() interface.
 
     :param str prog: GRASS module
@@ -1596,7 +1598,7 @@
         except ValueError as e:
             _debug_level = 0
             sys.stderr.write(_("WARNING: Ignoring unsupported debug level 
(must be >=0 and <=5). {}\n").format(e))
-            
+
     return _debug_level
 
 
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to