Skip to content

Commit

Permalink
virtme-ng: introduce -q/--quiet
Browse files Browse the repository at this point in the history
Introduce an option to nullify the effect -v/--verbose.

This option can be useful to override certain wrappers / aliases around
vng, as pointed out in issue #58.

Signed-off-by: Andrea Righi <[email protected]>
  • Loading branch information
Andrea Righi committed Jan 29, 2024
1 parent 0703320 commit cbbc7c7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions virtme_ng/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ def make_parser():
help="Increase console output verbosity.",
)

parser.add_argument(
"--quiet",
"-q",
action="store_true",
help="Override verbose mode (disable --verbose).",
)

parser.add_argument(
"--qemu-opts",
"-o",
Expand Down Expand Up @@ -1113,6 +1120,9 @@ def do_it() -> int:
for opt in kern_source.default_opts:
val = kern_source.default_opts[opt]
setattr(args, opt, val)

if args.verbose and args.quiet:
args.verbose = False
try:
if args.clean:
clean(kern_source, args)
Expand Down

0 comments on commit cbbc7c7

Please sign in to comment.