listener: make sure device has a status before processing notifications

This commit is contained in:
Peter F. Patel-Schneider 2020-10-01 15:53:28 -04:00
parent 7908a4f5a4
commit a9d6b4c319
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ class ReceiverListener(_listener.EventsListener):
# the receiver changed status as well # the receiver changed status as well
self._status_changed(self.receiver) self._status_changed(self.receiver)
if dev.status is None: if not hasattr(dev, 'status') or dev.status is None:
# notification before device status set up - don't process it # notification before device status set up - don't process it
_log.warn('%s before device %s has status', n, dev) _log.warn('%s before device %s has status', n, dev)
else: else: