#NEWLINE# @ tornado . gen . coroutine #NEWLINE# def _call_with_autoconnect( self , * args , **kwargs ) : #NEWLINE# #INDENT# ( yield self . connect ( ) ) #NEWLINE# if ( not self . is_connected ( ) ) : #NEWLINE# #INDENT# raise tornado . gen . Return ( ConnectionError ( 'impossible to connect' ) ) #NEWLINE# #UNINDENT# res = ( yield self . _call ( * self , ** kwargs ) ) #NEWLINE# raise tornado . gen . Return ( res )