[GRASS-SVN] r71114 - grass/trunk/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 23 02:01:54 PDT 2017


Author: lucadelu
Date: 2017-05-23 02:01:54 -0700 (Tue, 23 May 2017)
New Revision: 71114

Modified:
   grass/trunk/lib/python/script/core.py
Log:
python scripting library: added superquiet options to some functions

Modified: grass/trunk/lib/python/script/core.py
===================================================================
--- grass/trunk/lib/python/script/core.py	2017-05-23 09:00:31 UTC (rev 71113)
+++ grass/trunk/lib/python/script/core.py	2017-05-23 09:01:54 UTC (rev 71114)
@@ -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). {0}\n").format(e))
-            
+
     return _debug_level
 
 



More information about the grass-commit mailing list