From 44988695abcb5b2d17c172ee6ce61a10a986c568 Mon Sep 17 00:00:00 2001 From: Liam Murphy Date: Mon, 1 Nov 2021 19:51:55 +1100 Subject: [PATCH] Report error when no devices found to configure. (#398) --- tools/configure.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/configure.py b/tools/configure.py index e25e05b..4072e53 100755 --- a/tools/configure.py +++ b/tools/configure.py @@ -124,7 +124,10 @@ def main(args): length=32, byteorder='big', signed=False) } - for authenticator in tqdm(get_opensk_devices(args.batch)): + devices = get_opensk_devices(args.batch) + if not devices: + fatal("No devices found.") + for authenticator in tqdm(devices): # If the device supports it, wink to show which device # we're going to program. if authenticator.device.capabilities & hid.CAPABILITY.WINK: