[libvirt PATCH v2 3/6] ci: helper: Introduce --quiet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Offer an option to silence all output to stdout, e.g. when generating
dockerfiles/varsfiles.

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 ci/helper | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/ci/helper b/ci/helper
index 8f34f4b59d..abac686d22 100755
--- a/ci/helper
+++ b/ci/helper
@@ -68,6 +68,12 @@ class Parser:
 
         # Main parser
         self.parser = argparse.ArgumentParser()
+        self.parser.add_argument(
+            "--quiet",
+            action="store_true",
+            default=False,
+            help="silence all output"
+        )
         subparsers = self.parser.add_subparsers(
             dest="action",
             metavar="ACTION",
@@ -173,7 +179,8 @@ class Application:
             outfile = f"ci-{host}-cross-{cross}.Dockerfile"
 
         outpath = outdir.joinpath(outfile)
-        print(outpath)
+        if not self.args.quiet:
+            print(outpath)
 
         output = self.lcitool_run(args)
         with open(outpath, "w") as f:
@@ -185,7 +192,8 @@ class Application:
         outfile = f"{host}.vars"
 
         outpath = outdir.joinpath(outfile)
-        print(outpath)
+        if not self.args.quiet:
+            print(outpath)
 
         output = self.lcitool_run(args)
         with open(outpath, "w") as f:
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux