aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2012-11-30 17:26:56 +0000
committerBryn M. Reeves <bmr@redhat.com>2012-11-30 17:26:56 +0000
commite0e3760ab5c958291675531452673f6a0a06e6ed (patch)
treed40570b27e37b71222bedd38522dd2b84e74754e
parent8e63bc2567e1a1a6a77531a01f84dae08cb2814d (diff)
downloadsos-e0e3760ab5c958291675531452673f6a0a06e6ed.tar.gz
Collect stderr output from external commands
-rw-r--r--sos/utilities.py4
1 files 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: