#NEWLINE# def __init__( self , full_cmd , stdout , stderr ) : #NEWLINE# #INDENT# self . full_cmd = full_cmd #NEWLINE# self . stdout = stdout #NEWLINE# self . stderr = stderr #NEWLINE# if ( self . stdout is None ) : #NEWLINE# #INDENT# tstdout = '<redirected>' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tstdout = self . stdout [ : self . truncate_cap ] #NEWLINE# out_delta = ( len ( self . stdout ) - len ( tstdout ) ) #NEWLINE# if out_delta : #NEWLINE# #INDENT# tstdout += ( '... (%d more, please see e.stdout)' % out_delta ) . encode ( ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . stderr is None ) : #NEWLINE# #INDENT# tstderr = '<redirected>' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tstderr = self . stderr [ : self . truncate_cap ] #NEWLINE# err_delta = ( len ( self . stderr ) - len ( tstderr ) ) #NEWLINE# if err_delta : #NEWLINE# #INDENT# tstderr += ( '... (%d more, please see e.stderr)' % err_delta ) . encode ( ) #NEWLINE# #UNINDENT# #UNINDENT# msg = ( '\n\nRan: %r\n\nSTDOUT:\n\n  %s\n\nSTDERR:\n\n  %s' % ( full_cmd , tstdout . decode ( DEFAULT_ENCODING , 'replace' ) , tstderr . decode ( DEFAULT_ENCODING , 'replace' ) ) ) #NEWLINE# super ( ErrorReturnCode , self ) . __init__ ( msg )