Skip to content

Commit

Permalink
properly check for blinkstick
Browse files Browse the repository at this point in the history
  • Loading branch information
tobru committed Jun 1, 2024
1 parent 892b16a commit fdbaaf0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions podstatus/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
bstick = blinkstick.find_first()
if not bstick:
logging.info("No BlinkStick found")
logging.info(
f"BlinkStick found: {bstick.get_description()} - {bstick.get_serial()}"
)
logging.info(
f"Setting total LED to {config.BLINKSTICK_TOTAL_LED} and grouping to {config.BLINKSTICK_GROUP_LED}"
)
bstick.set_led_count(config.BLINKSTICK_TOTAL_LED)
led_per_pod = config.BLINKSTICK_GROUP_LED
else:
logging.info(
f"BlinkStick found: {bstick.get_description()} - {bstick.get_serial()}"
)
logging.info(
f"Setting total LED to {config.BLINKSTICK_TOTAL_LED} and grouping to {config.BLINKSTICK_GROUP_LED}"
)
bstick.set_led_count(config.BLINKSTICK_TOTAL_LED)
led_per_pod = config.BLINKSTICK_GROUP_LED
except NoBackendError as e:
logging.fatal(f"BlinkStick setup failed: {e}")
bstick = None
Expand Down

0 comments on commit fdbaaf0

Please sign in to comment.