Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: qvm-ls outputs to stderr for --help-* calls #254

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions qubesadmin/tools/qvm_ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ def __call__(self, parser, namespace, values, option_string=None):
for column in sorted(Column.columns.values()))
text += '\n\nAdditionally any VM property may be used as a column, ' \
'see qvm-prefs --help-properties for available values'
parser.exit(message=text + '\n')
print(text + '\n')
sys.exit(0)


class _HelpFormatsAction(argparse.Action):
Expand All @@ -553,7 +554,9 @@ def __call__(self, parser, namespace, values, option_string=None):
' {fmt:{width}s} {columns}\n'.format(
fmt=fmt, columns=','.join(formats[fmt]).upper(), width=width)
for fmt in sorted(formats))
parser.exit(message=text)
print(text)
sys.exit(0)



# common VM power states for easy command-line filtering
Expand Down