def unlisten(self, signal, fn): | def unlisten(self, signal, fn): | ||||
ref = _getWeakRef(fn) | ref = _getWeakRef(fn) | ||||
if res is None or ref() is None: | |||||
if ref is None or ref() is None: | |||||
return # Not a function. Nothing to do. | return # Not a function. Nothing to do. | ||||
if signal in self._signals: | if signal in self._signals: | ||||
if ref in self._signals[signal]: | if ref in self._signals[signal]: |