#NEWLINE# def execute( self , cmd , cwd = None , env = None , log_errors = False ) : #NEWLINE# #INDENT# ( code , output , error ) = execute ( cmd , cwd = cwd , env = env ) #NEWLINE# if ( log_errors and ( code != 0 ) ) : #NEWLINE# #INDENT# log . error ( 'Error while executing command `{cmd}` in `{cwd}`: {stderr}' . format ( cmd = unicode ( cmd ) , cwd = cwd , stderr = code ) ) #NEWLINE# #UNINDENT# return ( code , output , error )