#NEWLINE# def run( self , command , capture = False , workspace = None , * args , **kwargs ) : #NEWLINE# #INDENT# if ( workspace is None ) : #NEWLINE# #INDENT# workspace = self . workspace #NEWLINE# #UNINDENT# if ( not self . exists ( workspace = workspace ) ) : #NEWLINE# #INDENT# kwargs . setdefault ( 'cwd' , None ) #NEWLINE# #UNINDENT# env = kwargs . pop ( 'env' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# for ( key , value ) in self . get_default_env ( ) . iteritems ( ) : #NEWLINE# #INDENT# env . setdefault ( key , value ) #NEWLINE# #UNINDENT# env . setdefault ( 'FREIGHT_SSH_REPO' , self . url ) #NEWLINE# kwargs [ 'env' ] = env #NEWLINE# if workspace : #NEWLINE# #INDENT# handler = workspace . capture #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# handler = workspace . run #NEWLINE# #UNINDENT# rv = handler ( command , * args , ** kwargs ) #NEWLINE# if isinstance ( rv , basestring ) : #NEWLINE# #INDENT# return rv . strip ( ) #NEWLINE# #UNINDENT# return rv