#NEWLINE# def add_consumer( self , resource_dependency ) : #NEWLINE# #INDENT# if ( not txpostgres ) : #NEWLINE# #INDENT# raise exceptions . ConfigurationError ( 'txpostgres is not installed' ) #NEWLINE# #UNINDENT# profile_name = resource_dependency . provider . split ( '.' ) [ 2 ] #NEWLINE# listener = self . _ensure_profile_has_listener ( profile_name ) #NEWLINE# self . _bind_events_for_consumer ( resource_dependency , profile_name ) #NEWLINE# if listener . is_connected : #NEWLINE# #INDENT# resource_dependency . on_resource_ready ( listener )