From cd51061bb0427dcc427ed836ab97bd682c822dc3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 8 Oct 2023 12:46:01 +0200 Subject: [PATCH] cli: hw slot enable: bugfix default slot --- software/script/chameleon_cli_unit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/software/script/chameleon_cli_unit.py b/software/script/chameleon_cli_unit.py index 33b4a058..28d86925 100644 --- a/software/script/chameleon_cli_unit.py +++ b/software/script/chameleon_cli_unit.py @@ -1356,7 +1356,10 @@ def args_parser(self) -> ArgumentParserNoExit: return parser def on_exec(self, args: argparse.Namespace): - slot_num = args.slot + if args.slot is not None: + slot_num = args.slot + else: + slot_num = chameleon_cmd.SlotNumber.from_fw(self.cmd.get_active_slot()) if args.lf: sense_type = chameleon_cmd.TagSenseType.LF else: