def __call__(self, event): self.logger.debug('intercept event') if self._filter(event): self.action(event)