Skip to content

Commit

Permalink
catch USBError
Browse files Browse the repository at this point in the history
  • Loading branch information
tobru committed Jun 1, 2024
1 parent cabd180 commit fa4316e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions podstatus/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit fa4316e

Please sign in to comment.