tags 928485 + patch,pending thanks I have submitted a patch upstream fixing this issue. Merge request available at:
https://gitlab.com/larswirzenius/vmdb2/merge_requests/4 FWIW, the changes are basically trivial, so I'm inlining them here as well: diff --git a/vmdb/app.py b/vmdb/app.py index 5073a05..30bcf17 100644 --- a/vmdb/app.py +++ b/vmdb/app.py @@ -34,7 +34,11 @@ class Vmdb2(cliapp.Application): self.settings.boolean( ['verbose', 'v'], - 'verbose output') + 'verbose output (print out all steps as they are processed). Implies (and overrides) output is not set to quiet.') + + self.settings.boolean( + ['quiet', 'q'], + 'quiet output (omit printing error messages). Ineffective if verbose is set.') def setup(self): self.step_runners = vmdb.StepRunnerList() @@ -43,7 +47,7 @@ class Vmdb2(cliapp.Application): if len(args) != 1: sys.exit("No image specification was given on the command line.") - vmdb.set_verbose_progress(self.settings['verbose']) + vmdb.set_verbose_progress(self.settings['verbose'], self.settings['quiet']) spec = self.load_spec_file(args[0]) state = vmdb.State() diff --git a/vmdb/runcmd.py b/vmdb/runcmd.py index e1d88a5..d37c955 100644 --- a/vmdb/runcmd.py +++ b/vmdb/runcmd.py @@ -24,16 +24,18 @@ import cliapp _verbose = False +_quiet = False - -def set_verbose_progress(verbose): +def set_verbose_progress(verbose, quiet): global _verbose + global _quiet + # Verbose implies not-quiet _verbose = verbose - + _quiet = verbose | quiet def error(msg): logging.error(msg, exc_info=True) - if _verbose: + if not _quiet: sys.stderr.write('ERROR: {}\n'.format(msg))
signature.asc
Description: PGP signature