scripts: Re-added -q/--quiet to result scripts

I forgot that this is still useful for erroring scripts, such as
stack.py when checking for recursion.

Technically this is possible with -o/dev/null, but that's both
unnecessarily complicated and includes the csv encoding cost for no
reason.
This commit is contained in:
Christopher Haster
2025-03-06 17:50:18 -06:00
parent 675a805164
commit 0d134a2830
9 changed files with 45 additions and 9 deletions

View File

@@ -1379,7 +1379,7 @@ def main(obj_paths, *,
depth=depth,
**args)
# print table
else:
elif not args.get('quiet'):
table(CtxResult, results, diff_results,
by=by,
fields=fields,
@@ -1403,6 +1403,10 @@ if __name__ == "__main__":
'-v', '--verbose',
action='store_true',
help="Output commands that run behind the scenes.")
parser.add_argument(
'-q', '--quiet',
action='store_true',
help="Don't show anything, useful when checking for errors.")
parser.add_argument(
'-o', '--output',
help="Specify CSV file to store results.")