def attach_signal_connect_info(attr, obj, func, after, idle): """ Adds signal connection info to function Used by signal and trigger decorators """ connect_params = dict(after=after, idle=idle) if func: if not getattr(func, '__call__'): raise Exception('Signal decorator accept callable or connect params') append_attr(func, attr, (obj, connect_params)) return func else: def inner(func): append_attr(func, attr, (obj, connect_params)) return func return inner
def inner(func): append_attr(func, attr, (obj, connect_params)) return func