diff options
author | Radek Novacek <rnovacek@redhat.com> | 2014-05-19 12:23:39 +0200 |
---|---|---|
committer | Radek Novacek <rnovacek@redhat.com> | 2014-05-19 12:49:08 +0200 |
commit | e437478a328b8b4d3e7323e3ec34d29b72b067fa (patch) | |
tree | 44ddf641c2c2bcf9c2d0a16b096b125d884cb519 | |
parent | 93ec6c96b04387f48433fcf3edc8058e1e79efcc (diff) | |
download | openlmi-providers-e437478a328b8b4d3e7323e3ec34d29b72b067fa.tar.gz openlmi-providers-e437478a328b8b4d3e7323e3ec34d29b72b067fa.tar.xz openlmi-providers-e437478a328b8b4d3e7323e3ec34d29b72b067fa.zip |
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.
-rw-r--r-- | src/hardware/test/TestHardwareBase.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): """ |