diff --git a/podstatus/app.py b/podstatus/app.py index 690f424..8342ce0 100644 --- a/podstatus/app.py +++ b/podstatus/app.py @@ -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