Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftshader
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
swiftshader
Commits
118ca798
Commit
118ca798
authored
Sep 30, 2014
by
Jim Stichnoth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
utils.py
pydir/utils.py
+2
-2
No files found.
pydir/utils.py
View file @
118ca798
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment