From ffb9b2710b6bbdf5dfd8c438103c5ae2d034eb49 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Thu, 14 Apr 2022 20:01:30 -0400 Subject: [PATCH] device: use isDevice, not kind, to distinguish between devices and receivers --- lib/logitech_receiver/notifications.py | 2 +- lib/logitech_receiver/status.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logitech_receiver/notifications.py b/lib/logitech_receiver/notifications.py index 50a47f66..b17dd753 100644 --- a/lib/logitech_receiver/notifications.py +++ b/lib/logitech_receiver/notifications.py @@ -54,7 +54,7 @@ def process(device, notification): status = device.status assert status is not None - if device.kind is None: + if not device.isDevice: return _process_receiver_notification(device, status, notification) return _process_device_notification(device, status, notification) diff --git a/lib/logitech_receiver/status.py b/lib/logitech_receiver/status.py index c3568e38..04f615ed 100644 --- a/lib/logitech_receiver/status.py +++ b/lib/logitech_receiver/status.py @@ -71,7 +71,7 @@ def attach_to(device, changed_callback): assert changed_callback if not hasattr(device, 'status') or device.status is None: - if device.kind is None: + if not device.isDevice: device.status = ReceiverStatus(device, changed_callback) else: device.status = DeviceStatus(device, changed_callback)