Merge "logging: set stdout and stderr to None in some cases"

This commit is contained in:
Tao Bao
2019-07-17 15:40:59 +00:00
committed by Gerrit Code Review
2 changed files with 7 additions and 5 deletions

View File

@@ -251,6 +251,8 @@ def RunAndCheckOutput(args, verbose=None, **kwargs):
"""
proc = Run(args, verbose=verbose, **kwargs)
output, _ = proc.communicate()
if output is None:
output = ""
# Don't log any if caller explicitly says so.
if verbose != False:
logger.info("%s", output.rstrip())