From e437478a328b8b4d3e7323e3ec34d29b72b067fa Mon Sep 17 00:00:00 2001 From: Radek Novacek Date: Mon, 19 May 2014 12:23:39 +0200 Subject: hardware: replace subprocess.check_output with Popen There is no check_output function in subprocess module in python 2.6, Popen will be used instead. --- src/hardware/test/TestHardwareBase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hardware/test/TestHardwareBase.py b/src/hardware/test/TestHardwareBase.py index 310210c..b0b0cf3 100644 --- a/src/hardware/test/TestHardwareBase.py +++ b/src/hardware/test/TestHardwareBase.py @@ -113,7 +113,8 @@ def parse_dmi_output(dmioutput): return devices def get_dmi_output(type_p): - return subprocess.check_output("dmidecode -t %d" % type_p, shell=True) + p = subprocess.Popen(["dmidecode", "-t", str(type_p)], stdout=subprocess.PIPE) + return p.communicate()[0] class HardwareTestCase(LmiTestCase): """ -- cgit