listener: check for presence of status attribute when resuming
This commit is contained in:
parent
b05f4111d5
commit
9e5eb5853e
|
@ -339,7 +339,7 @@ def ping_all(resuming=False):
|
||||||
_log.info('ping all devices%s', ' when resuming' if resuming else '')
|
_log.info('ping all devices%s', ' when resuming' if resuming else '')
|
||||||
for l in _all_listeners.values():
|
for l in _all_listeners.values():
|
||||||
if l.receiver.isDevice:
|
if l.receiver.isDevice:
|
||||||
if resuming:
|
if resuming and hasattr(l.reciever, 'status'):
|
||||||
l.receiver.status._active = None # ensure that settings are pushed
|
l.receiver.status._active = None # ensure that settings are pushed
|
||||||
if l.receiver.ping():
|
if l.receiver.ping():
|
||||||
l.receiver.status.changed(active=True, push=True)
|
l.receiver.status.changed(active=True, push=True)
|
||||||
|
@ -348,7 +348,7 @@ def ping_all(resuming=False):
|
||||||
count = l.receiver.count()
|
count = l.receiver.count()
|
||||||
if count:
|
if count:
|
||||||
for dev in l.receiver:
|
for dev in l.receiver:
|
||||||
if resuming:
|
if resuming and hasattr(dev, 'status'):
|
||||||
dev.status._active = None # ensure that settings are pushed
|
dev.status._active = None # ensure that settings are pushed
|
||||||
if dev.ping():
|
if dev.ping():
|
||||||
dev.status.changed(active=True, push=True)
|
dev.status.changed(active=True, push=True)
|
||||||
|
|
Loading…
Reference in New Issue