Skip to content

Commit ca725e7

Browse files
committed
q-dev: fix default behavior of qvm-device *CLASS*
`qvm-device *CLASS*` should list all available *CLASS* devices
1 parent ecdcd5e commit ca725e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qubesadmin/tools/qvm_device.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def list_devices(args):
9898
domains = args.domains if hasattr(args, "domains") else None
9999
lines = _load_lines(args.app, domains, args.devclass, actual_devices=True)
100100
lines = list(lines.values())
101-
if args.assignments:
101+
# short command without (list/ls) should print just existing devices
102+
# short command is not a great place for introducing listing specific flags
103+
if getattr(args, "assignments", False):
102104
# we need to check assignments for all domains since
103105
# selected vm can be mentioned there as backend
104106
extra_lines = _load_lines(

0 commit comments

Comments
 (0)