def send_catch_log(signal=Any, sender=Anonymous, *arguments, **named):
 dont_log = named.pop('dont_log', None)
 spider = named.get('spider', None)
 responses = []
 for receiver in liveReceivers(getAllReceivers(sender, signal)):
  try:
   response = robustApply(receiver, signal=signal, sender=sender, *arguments, **named)
   if isinstance(response, Deferred):
    log.msg(('Cannot return deferreds from signal handler: %s' % receiver), log.ERROR, spider=spider)
  except dont_log:
   result = Failure()
  except Exception:
   result = Failure()
   log.err(result, ('Error caught on signal handler: %s' % receiver), spider=spider)
  else:
   result = response
  responses.append((receiver, result))
 return responses

def send_catch_log ( signal = Any , sender = Anonymous , * arguments , ** named ) : dont_log = named . pop ( 'dont_log' , None ) spider = named . get ( 'spider' , None ) responses = [ ] for receiver in liveReceivers ( getAllReceivers ( sender , signal ) ) : try : response = robustApply ( receiver , signal = signal , sender = sender , * arguments , ** named ) if isinstance ( response , Deferred ) : log . msg ( ( 'Cannot return deferreds from signal handler: %s' % receiver ) , log . ERROR , spider = spider ) except dont_log : result = Failure ( ) except Exception : result = Failure ( ) log . err ( result , ( 'Error caught on signal handler: %s' % receiver ) , spider = spider ) else : result = response responses . append ( ( receiver , result ) ) return responses
like pydispatcher .