#NEWLINE# def _create_new_connection( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . _add_conn_if_under_max ( ) #NEWLINE# #UNINDENT# except ( ConnectionException , socket . error ) as exc : #NEWLINE# #INDENT# log . warning ( 'Failed to create new connection to %s: %s' , self . host , exc ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# log . exception ( 'Unexpectedly failed to create new connection' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# with self . _lock : #NEWLINE# #INDENT# self . _scheduled_for_creation -= 1