#NEWLINE# def get_output( self , cmd ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# fnull = open ( os . devnull , 'w' ) #NEWLINE# process = subprocess . Popen ( fnull , stdout = subprocess . PIPE , stderr = fnull ) #NEWLINE# fnull . close ( ) #NEWLINE# #UNINDENT# except ( OSError , EnvironmentError ) : #NEWLINE# #INDENT# self . logger . debug ( 'Subprocess failed.' ) #NEWLINE# return False #NEWLINE# #UNINDENT# ( out , err ) = process . communicate ( ) #NEWLINE# return out