listener: ignore many notifications that come to a device listener
This commit is contained in:
parent
7873f3e8d0
commit
c1ce3c2c5f
|
@ -22,6 +22,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
import time
|
||||
|
||||
from collections import namedtuple
|
||||
from logging import DEBUG as _DEBUG
|
||||
from logging import INFO as _INFO
|
||||
from logging import WARNING as _WARNING
|
||||
from logging import getLogger
|
||||
|
@ -193,6 +194,12 @@ class ReceiverListener(_listener.EventsListener):
|
|||
_notifications.process(self.receiver, n)
|
||||
return
|
||||
|
||||
# a notification that came in to the device listener - strange, but nothing needs to be done here
|
||||
if self.receiver.isDevice:
|
||||
if _log.isEnabledFor(_DEBUG):
|
||||
_log.debug('Notification %s via device %s being ignored.', n, self.receiver)
|
||||
return
|
||||
|
||||
# a device notification
|
||||
if not (0 < n.devnumber <= self.receiver.max_devices):
|
||||
if _log.isEnabledFor(_WARNING):
|
||||
|
|
Loading…
Reference in New Issue