From 4ea814fcebbe272a9a62d3f6a26a93cccf5b39ac Mon Sep 17 00:00:00 2001 From: Piotr Bartman-Szwarc Date: Wed, 7 Aug 2024 12:13:20 +0200 Subject: [PATCH] q-dev: fix qvm-device --- qubesadmin/tools/qvm_device.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/qubesadmin/tools/qvm_device.py b/qubesadmin/tools/qvm_device.py index 1aa43587..4e0c5479 100644 --- a/qubesadmin/tools/qvm_device.py +++ b/qubesadmin/tools/qvm_device.py @@ -418,25 +418,26 @@ def get_parser(device_class=None): attach_parser.add_argument(*read_only[0], **read_only[1]) assign_parser.add_argument(*read_only[0], **read_only[1]) - mode_parser = assign_parser.add_mutually_exclusive_group() - mode_parser.add_argument('--persistent', '-p', + attach_parser.add_argument('--persistent', '-p', dest='required', action='store_true', default=False, help="Alias to `assign --required` for backward " "compatibility") + + mode_parser = assign_parser.add_mutually_exclusive_group() mode_parser.add_argument('--ask', '--ask-to-attach', action='store_true', default=False, help="Always ask before auto-attachment") + mode_parser.add_argument('--required', '-r', + dest='required', + action='store_true', + default=False, + help="Mark device as required so it will " + "be required to the qube's startup and then" + " automatically attached)") - assign_parser.add_argument('--required', '-r', - dest='required', - action='store_true', - default=False, - help="Mark device as required so it will " - "be required to the qube's startup and then" - " automatically attached)") assign_parser.add_argument('--port', action='store_true', default=False,