#NEWLINE# def __init__( self , sshctx , loc_host , loc_port , rem_host , rem_port ) : #NEWLINE# #INDENT# self . loc_host = loc_host #NEWLINE# self . loc_port = rem_port #NEWLINE# self . rem_host = rem_host #NEWLINE# self . rem_port = rem_port #NEWLINE# self . sshctx = sshctx #NEWLINE# self . proc = sshctx . popen ( 'python' , '-u' , '-c' , self . PROGRAM , L = ( '[%s]:%s:[%s]:%s' % ( loc_host , loc_port , rem_host , rem_port ) ) ) #NEWLINE# banner = self . proc . stdout . readline ( ) . strip ( ) #NEWLINE# if ( banner != BYTES_LITERAL ( 'ready' ) ) : #NEWLINE# #INDENT# raise ValueError ( 'tunnel failed' , banner )