diff options
-rw-r--r-- | cxmanage/image.py | 5 | ||||
-rwxr-xr-x | scripts/cxmanage | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/cxmanage/image.py b/cxmanage/image.py index 7819be0..dcaca2d 100644 --- a/cxmanage/image.py +++ b/cxmanage/image.py @@ -109,8 +109,9 @@ class Image: def verify(self): """ Return true if the image is valid, false otherwise """ try: - file_type = subprocess.check_output(["file", self.filename] - ).split()[1] + file_process = subprocess.Popen(["file", self.filename], + stdout=subprocess.PIPE) + file_type = file_process.communicate()[0].split()[1] if self.type == "SOC_ELF": if file_type != "ELF": return False diff --git a/scripts/cxmanage b/scripts/cxmanage index b9fecf4..e6d6287 100755 --- a/scripts/cxmanage +++ b/scripts/cxmanage @@ -303,7 +303,8 @@ def check_versions(): args = [os.environ['IPMITOOL_PATH'], '-V'] else: args = ['ipmitool', '-V'] - ipmitool_version = subprocess.check_output(args).split()[2] + ipmitool_process = subprocess.Popen(args, stdout=subprocess.PIPE) + ipmitool_version = ipmitool_process.communicate()[0].split()[2] if not '-cx' in ipmitool_version: print 'ERROR: cxmanage is not compatible with IPMItool version %s\n'\ % ipmitool_version |