reduce debugging from utils.trycmd()
In the case where the command fails, we're returning the err anyway and the caller can log if required. In the discard_warnings=True case, then the caller has explicitly asked to suppress the warnings, so don't log this noise either. Fixes bug: 1030609 Change-Id: I075c21aa6508182ae6dd030cf41ec31916559957
This commit is contained in:
		@@ -223,12 +223,10 @@ def trycmd(*args, **kwargs):
 | 
			
		||||
        failed = False
 | 
			
		||||
    except exception.ProcessExecutionError, exn:
 | 
			
		||||
        out, err = '', str(exn)
 | 
			
		||||
        LOG.debug(err)
 | 
			
		||||
        failed = True
 | 
			
		||||
 | 
			
		||||
    if not failed and discard_warnings and err:
 | 
			
		||||
        # Handle commands that output to stderr but otherwise succeed
 | 
			
		||||
        LOG.debug(err)
 | 
			
		||||
        err = ''
 | 
			
		||||
 | 
			
		||||
    return out, err
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user