#NEWLINE# def register_resource( self , resource ) : #NEWLINE# #INDENT# if ( resource . name in self . _resources ) : #NEWLINE# #INDENT# LOG . warning ( _LW ( '%s is already registered' ) , resource . name ) #NEWLINE# #UNINDENT# if ( resource . name in self . _tracked_resource_mappings ) : #NEWLINE# #INDENT# resource . register_events ( ) #NEWLINE# #UNINDENT# self . _resources [ resource . name ] = resource