#NEWLINE# def getOutput( args , return_list = False ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# logIt ( ( 'Running command : %s' % ' ' . join ( args ) ) ) #NEWLINE# output = None #NEWLINE# if return_list : #NEWLINE# #INDENT# output = os . popen ( ' ' . join ( args ) ) . readlines ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output = os . popen ( ' ' . join ( args ) ) . read ( ) . strip ( ) #NEWLINE# #UNINDENT# return output #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# logIt ( ( 'Error running command : %s' % ' ' . join ( return_list ) ) , True ) #NEWLINE# logIt ( traceback . format_exc ( ) , True ) #NEWLINE# sys . exit ( 1 )