From 9f377d345fd1de8c8f1137df1e9b73a3f0f1835f Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 23 Aug 2010 14:39:38 -0700 Subject: Send stderr over to the pipe command too I don't like doing this, but I'm failing at coming up with a clever way to only do it in cases we know we want it, such as rpmbuild calls. Since that's the only thing we're piping right now, call it good, but I still don't like it. --- src/pyfedpkg/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/pyfedpkg') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 0077383..622717b 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -136,9 +136,12 @@ def _run_command(cmd, shell=False, env=None, pipe=[], cwd=None): subprocess.list2cmdline(cmd)) try: if pipe: + # We're piping the stderr over too, which is probably a + # bad thing, but rpmbuild likes to put useful data on + # stderr, so.... proc = subprocess.Popen(command, env=environ, stdout=subprocess.PIPE, - stderr=sys.stderr, shell=shell, + stderr=subprocess.STDOUT, shell=shell, cwd=cwd) subprocess.check_call(pipecmd, env=environ, stdout=sys.stdout, -- cgit