ui: only emit warning when updating tray for inactive device
This commit is contained in:
parent
52109ade91
commit
504d23fab7
|
@ -445,8 +445,9 @@ def _remove_receiver(receiver):
|
||||||
|
|
||||||
|
|
||||||
def _update_menu_item(index, device):
|
def _update_menu_item(index, device):
|
||||||
assert device
|
if not device or device.status is None:
|
||||||
assert device.status is not None
|
_log.warn('updating an inactive device %s, assuming disconnected', device)
|
||||||
|
return None
|
||||||
|
|
||||||
menu_items = _menu.get_children()
|
menu_items = _menu.get_children()
|
||||||
menu_item = menu_items[index]
|
menu_item = menu_items[index]
|
||||||
|
|
Loading…
Reference in New Issue