OSDN Git Service
(root)
/
android-x86
/
external-swiftshader.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ac50dc
)
Subzero: Change the echoing in shellcmd().
author
Jim Stichnoth
<stichnot@chromium.org>
Tue, 30 Sep 2014 17:52:04 +0000
(10:52 -0700)
committer
Jim Stichnoth
<stichnot@chromium.org>
Tue, 30 Sep 2014 17:52:04 +0000
(10:52 -0700)
This makes it much easier to copy/paste the output.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/
611983003
pydir/utils.py
patch
|
blob
|
history
diff --git
a/pydir/utils.py
b/pydir/utils.py
index
33b58e9
..
1141e3e
100644
(file)
--- a/
pydir/utils.py
+++ b/
pydir/utils.py
@@
-3,11
+3,11
@@
import subprocess
import sys
def shellcmd(command, echo=True):
- if echo: print '[cmd]', command
-
if not isinstance(command, str):
command = ' '.join(command)
+ if echo: print '[cmd]', command
+
stdout_result = subprocess.check_output(command, shell=True)
if echo: sys.stdout.write(stdout_result)
return stdout_result