Ignore connection failures for debug.log_signals

This commit is contained in:
Florian Bruhin 2016-12-08 07:05:18 +01:00
parent 70b0a86729
commit c7d4ea5247

View File

@ -70,7 +70,10 @@ def log_signals(obj):
name = bytes(meta_method.name()).decode('ascii')
if name != 'destroyed':
signal = getattr(obj, name)
signal.connect(functools.partial(log_slot, obj, signal))
try:
signal.connect(functools.partial(log_slot, obj, signal))
except TypeError:
pass
if inspect.isclass(obj):
old_init = obj.__init__