#NEWLINE# def _runner( self , classpath , main , jvm_options , args , cwd = None ) : #NEWLINE# #INDENT# 'Runner factory. Called via Executor.execute().' #NEWLINE# command = self . _create_command ( classpath , main , args , args ) #NEWLINE# class Runner ( self . Runner ) : #NEWLINE# #INDENT# @ property #NEWLINE# def executor( this ) : #NEWLINE# #INDENT# return self #NEWLINE# #UNINDENT# @ property #NEWLINE# def command( self ) : #NEWLINE# #INDENT# return list ( command ) #NEWLINE# #UNINDENT# def run( this , stdout = None , stderr = None , cwd = None ) : #NEWLINE# #INDENT# nailgun = self . _get_nailgun_client ( jvm_options , classpath , stdout , stderr ) #NEWLINE# try : #NEWLINE# #INDENT# logger . debug ( 'Executing via {ng_desc}: {cmd}' . format ( ng_desc = nailgun , cmd = this . cmd ) ) #NEWLINE# return nailgun . execute ( main , cwd , * args ) #NEWLINE# #UNINDENT# except nailgun . NailgunError as e : #NEWLINE# #INDENT# self . terminate ( ) #NEWLINE# raise self . Error ( 'Problem launching via {ng_desc} command {main} {args}: {msg}' . format ( ng_desc = nailgun , main = main , args = ' ' . join ( args ) , msg = e ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return Runner ( )