#NEWLINE# def _safely_call( self , thing_to_call , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Safely execute a callable.\n\n        The callable is wrapped in a try block and executed. If an\n        exception is raised it is logged.\n\n        ==============  ============\n        Argument        Description\n        ==============  ============\n        thing_to_call   The callable to execute.\n        *args           The positional arguments to be passed to the callable.\n        **kwargs        The keyword arguments to be passed to the callable.\n        ==============  ============\n        ' #NEWLINE# try : #NEWLINE# #INDENT# return thing_to_call ( * args , ** self ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# log . exception ( ( 'Exception raised in callback on %r.' % self ) )