From e0e3760ab5c958291675531452673f6a0a06e6ed Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 30 Nov 2012 17:26:56 +0000 Subject: Collect stderr output from external commands --- sos/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sos/utilities.py b/sos/utilities.py index 8fd16559..9aafacb3 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -29,7 +29,7 @@ import fnmatch import inspect from stat import * #from itertools import * -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE, STDOUT import shlex import logging import zipfile @@ -154,7 +154,7 @@ def sosGetCommandOutput(command, timeout=300): if timeout and is_executable("/usr/bin/timeout"): command = "/usr/bin/timeout %ds %s" % (timeout, command) - p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, bufsize=-1) + p = Popen(command, shell=True, stdout=PIPE, stderr=STDOUT, bufsize=-1) stdout, stderr = p.communicate() return (p.returncode, stdout, 0) else: -- cgit