device: use isDevice, not kind, to distinguish between devices and receivers
This commit is contained in:
parent
15b92a0f40
commit
ffb9b2710b
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue