#NEWLINE# def load_handler( self , handler_name , config , **kwargs ) : #NEWLINE# #INDENT# enabled = config . pop ( 'enabled' , False ) #NEWLINE# if ( not enabled ) : #NEWLINE# #INDENT# logger . debug ( "Handler %s 'enabled' is not set to true. Skipping." , handler_name ) #NEWLINE# return None #NEWLINE# #UNINDENT# cls_string = config . pop ( 'handler_class' ) #NEWLINE# logger . debug ( 'Initializing handler %s.' , handler_name ) #NEWLINE# try : #NEWLINE# #INDENT# handler_cls = load_object_from_string ( cls_string ) #NEWLINE# return handler_cls ( config ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# logutil . log_exception ( ( 'Skipping handler %s due to unhandled exception:' % handler_name ) , logger ) #NEWLINE# return None