#NEWLINE# def _wait_for_connection_to_open( self ) : #NEWLINE# #INDENT# 'Wait for the connection to fully open.\n\n        :return:\n        ' #NEWLINE# start_time = time . time ( ) #NEWLINE# timeout = ( ( self . parameters [ 'timeout' ] or 10 ) + 0.25 ) #NEWLINE# while ( not self . is_open ) : #NEWLINE# #INDENT# self . check_for_errors ( ) #NEWLINE# if ( ( time . time ( ) - start_time ) > timeout ) : #NEWLINE# #INDENT# raise AMQPConnectionError ( 'Connection timed out' ) #NEWLINE# #UNINDENT# sleep ( IDLE_WAIT )