[meld] write_pipe(): Discard stdout output
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] write_pipe(): Discard stdout output
- Date: Mon, 19 Apr 2010 21:18:40 +0000 (UTC)
commit 2de0b6cce1d78dc6a198c6af1bc720f0fe3edbaf
Author: Peter Tyser <ptyser gmail com>
Date: Sun Apr 11 15:30:34 2010 -0500
write_pipe(): Discard stdout output
Previously, meld would print any stdout output from a command executed
via the write_pipe() function to the command line. As an example:
$ ./bin/meld ./
(Double click on the git.py file in the meld GUI)
patching file meld/vc/git.py
(Double click on the _vc.py file in the meld GUI)
patching file meld/vc/_vc.py
The "patching file XYZ" output from the 'patch' command litters the
terminal window used to execute meld and doesn't provide any useful
information.
This change discards the stdout output of a command executed via the
write_pipe() function. Note that stderr output will still be
printed to the command line as it can be useful in diagnosing why
a sub-command is having errors.
Signed-off-by: Peter Tyser <ptyser gmail com>
meld/misc.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meld/misc.py b/meld/misc.py
index a434f1c..2139452 100644
--- a/meld/misc.py
+++ b/meld/misc.py
@@ -237,9 +237,9 @@ def read_pipe_iter(command, errorstream, yield_interval=0.1, workdir=None):
return sentinel()()
def write_pipe(command, text):
- """Write 'text' into a shell command.
+ """Write 'text' into a shell command and discard its stdout output.
"""
- proc = subprocess.Popen(command, stdin=subprocess.PIPE)
+ proc = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
proc.communicate(text)
return proc.wait()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]