From d92939135f22dd2844ce9f63b5494385f2f0051a Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Sun, 1 Nov 2020 08:54:26 -0500 Subject: [PATCH] device: warn when feature notifiation comes in before device fully set up --- lib/logitech_receiver/notifications.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/logitech_receiver/notifications.py b/lib/logitech_receiver/notifications.py index a0401840..c0c97f4d 100644 --- a/lib/logitech_receiver/notifications.py +++ b/lib/logitech_receiver/notifications.py @@ -125,7 +125,9 @@ def _process_device_notification(device, status, n): return _process_hidpp10_custom_notification(device, status, n) # assuming 0x00 to 0x3F are feature (HID++ 2.0) notifications - assert device.features + if not device.features: + _log.warn('%s: feature notification but features not set up: %02X %s', device, n.sub_id, n) + return False try: feature = device.features[n.sub_id] except IndexError: