From fa4316ed18a99b38bce86b2d2392a46e3ccb12a8 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Sat, 1 Jun 2024 22:05:37 +0200 Subject: [PATCH] catch USBError --- podstatus/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/podstatus/app.py b/podstatus/app.py index 4b83896..0212b16 100644 --- a/podstatus/app.py +++ b/podstatus/app.py @@ -9,7 +9,7 @@ from flask_bootstrap import Bootstrap5 from threading import Thread, Event from blinkstick import blinkstick -from usb.core import NoBackendError +from usb.core import NoBackendError, USBError from config import * @@ -46,7 +46,9 @@ except NoBackendError as e: logging.fatal(f"BlinkStick setup failed: {e}") bstick = None - +except USBError as e: + logging.fatal(f"BlinkStick setup failed: {e}") + bstick = None # Threading setup stop_event = Event()