summaryrefslogtreecommitdiff
path: root/tools/patman/gitutil.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-05 19:00:09 -0600
committerSimon Glass <sjg@chromium.org>2014-09-09 16:38:24 -0600
commitddaf5c8f3030050fcd356a1e49e3ee8f8f52c6d4 (patch)
treef670b03e86281912c34f2752b8e4371322634d7f /tools/patman/gitutil.py
parent6208fcef9457f3c9b72c482376cfdba4c60cb728 (diff)
downloadu-boot-imx-ddaf5c8f3030050fcd356a1e49e3ee8f8f52c6d4.zip
u-boot-imx-ddaf5c8f3030050fcd356a1e49e3ee8f8f52c6d4.tar.gz
u-boot-imx-ddaf5c8f3030050fcd356a1e49e3ee8f8f52c6d4.tar.bz2
patman: RunPipe() should not pipe stdout/stderr unless asked
RunPipe() currently pipes the output of stdout and stderr to a pty, but this is not the intended behaviour. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/gitutil.py')
-rw-r--r--tools/patman/gitutil.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 80edc7c..b68df5d 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -152,7 +152,8 @@ def Checkout(commit_hash, git_dir=None, work_tree=None, force=False):
if force:
pipe.append('-f')
pipe.append(commit_hash)
- result = command.RunPipe([pipe], capture=True, raise_on_error=False)
+ result = command.RunPipe([pipe], capture=True, raise_on_error=False,
+ capture_stderr=True)
if result.return_code != 0:
raise OSError, 'git checkout (%s): %s' % (pipe, result.stderr)
@@ -163,7 +164,8 @@ def Clone(git_dir, output_dir):
commit_hash: Commit hash to check out
"""
pipe = ['git', 'clone', git_dir, '.']
- result = command.RunPipe([pipe], capture=True, cwd=output_dir)
+ result = command.RunPipe([pipe], capture=True, cwd=output_dir,
+ capture_stderr=True)
if result.return_code != 0:
raise OSError, 'git clone: %s' % result.stderr
@@ -179,7 +181,7 @@ def Fetch(git_dir=None, work_tree=None):
if work_tree:
pipe.extend(['--work-tree', work_tree])
pipe.append('fetch')
- result = command.RunPipe([pipe], capture=True)
+ result = command.RunPipe([pipe], capture=True, capture_stderr=True)
if result.return_code != 0:
raise OSError, 'git fetch: %s' % result.stderr