qvm-ls: don't exclude dom0 when using --all

Fixes QubesOS/qubes-issues#5248.
This commit is contained in:
Pawel Marczewski 2020-01-15 14:14:57 +01:00
parent 1b53de8365
commit b112ef250d
No known key found for this signature in database
GPG Key ID: DE42EE9B14F96465

View File

@ -690,6 +690,14 @@ def main(args=None, app=None):
else:
domains = args.app.domains
if args.all_domains:
# Normally, --all means "all domains except for AdminVM".
# However, in the case of qvm-ls it does not make sense to exclude
# AdminVMs, so we override the list from parser.
domains = [
vm for vm in args.app.domains if vm.name not in args.exclude
]
if args.tags:
# filter only VMs having at least one of the specified tags
domains = [dom for dom in domains