Commit 118ca798 by Jim Stichnoth

Subzero: Change the echoing in shellcmd().

This makes it much easier to copy/paste the output. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/611983003
parent 0ac50dcf
...@@ -3,11 +3,11 @@ import subprocess ...@@ -3,11 +3,11 @@ import subprocess
import sys import sys
def shellcmd(command, echo=True): def shellcmd(command, echo=True):
if echo: print '[cmd]', command
if not isinstance(command, str): if not isinstance(command, str):
command = ' '.join(command) command = ' '.join(command)
if echo: print '[cmd]', command
stdout_result = subprocess.check_output(command, shell=True) stdout_result = subprocess.check_output(command, shell=True)
if echo: sys.stdout.write(stdout_result) if echo: sys.stdout.write(stdout_result)
return stdout_result return stdout_result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment