mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-01 03:07:46 +02:00
[common] PySignal: allow to disconnect another signal
This commit is contained in:
parent
3e5e4cf3e9
commit
3033e79181
1 changed files with 2 additions and 2 deletions
|
@ -173,8 +173,8 @@ class Signal(object):
|
||||||
(s[slotSelf] is slot.__func__)):
|
(s[slotSelf] is slot.__func__)):
|
||||||
self._slots.remove(s)
|
self._slots.remove(s)
|
||||||
break
|
break
|
||||||
elif isinstance(slot, partial) or '<' in slot.__name__:
|
elif isinstance(slot, (partial, Signal)) or '<' in slot.__name__:
|
||||||
# If it's a partial or lambda, try to remove directly
|
# If it's a partial, a Signal or lambda, try to remove directly
|
||||||
try:
|
try:
|
||||||
self._slots.remove(slot)
|
self._slots.remove(slot)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Loading…
Add table
Reference in a new issue