#NEWLINE# def check_call_capturing( arguments , input = None , preexec_fn = None ) : #NEWLINE# #INDENT# 'Spawn a process and return its output.' #NEWLINE# ( stdout , stderr , code ) = call_capturing ( arguments , input , preexec_fn ) #NEWLINE# if ( code == 0 ) : #NEWLINE# #INDENT# return ( stdout , stderr ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# from subprocess import CalledProcessError #NEWLINE# error = CalledProcessError ( code , arguments ) #NEWLINE# error . stdout = stdout #NEWLINE# error . stderr = stderr #NEWLINE# raise error