From ed0b730e74b5437c6f839771fa8cb4170e7c82a7 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Mon, 12 Jul 2021 10:32:26 -0400 Subject: [PATCH] device: fix bug with timeout when setting reprog keys --- lib/logitech_receiver/hidpp20.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logitech_receiver/hidpp20.py b/lib/logitech_receiver/hidpp20.py index 524808d2..bc640d70 100644 --- a/lib/logitech_receiver/hidpp20.py +++ b/lib/logitech_receiver/hidpp20.py @@ -572,7 +572,7 @@ class ReprogrammableKeyV4(ReprogrammableKey): ) ) ret = feature_request(self._device, FEATURE.REPROG_CONTROLS_V4, 0x30, *pkt) - if _unpack('!BBBBB', ret[:5]) != pkt and _log.isEnabledFor(_WARNING): + if ret is None or _unpack('!BBBBB', ret[:5]) != pkt and _log.isEnabledFor(_WARNING): _log.warn( f"REPROG_CONTROLS_v4 endpoint setCidReporting on device {self._device} should echo request packet, but didn't." )