def dispatch(self, ch, msg): if msg.method.name == "deliver": if self._process: self._process(msg) else: TwistedDelegate.dispatch(self, ch, msg)