From: Andrew Cooper Date: Wed, 4 Dec 2019 12:17:59 +0000 (+0000) Subject: Revert another part of ""Revert "Fix the use of ./xtf-runner on Python 2.4"" X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8dc075ee81377f8dd1104f622509a6dd4d9f7c2f;p=xtf.git Revert another part of ""Revert "Fix the use of ./xtf-runner on Python 2.4"" subprocess.check_output() is Python 2.7 only. Reported-by: Glenn Enright Signed-off-by: Andrew Cooper --- diff --git a/xtf-runner b/xtf-runner index 2a8df0c..1863ead 100755 --- a/xtf-runner +++ b/xtf-runner @@ -12,7 +12,7 @@ from __future__ import print_function, unicode_literals import sys, os, os.path as path from optparse import OptionParser -from subprocess import Popen, PIPE, call as subproc_call, check_output +from subprocess import Popen, PIPE, call as subproc_call try: import json @@ -397,7 +397,10 @@ def interpret_selection(opts): host_envs = [] - for line in check_output(['xl', 'info']).splitlines(): + cmd = Popen(['xl', 'info'], stdout = PIPE) + stdout, _ = cmd.communicate() + + for line in stdout.splitlines(): if not line.startswith("xen_caps"): continue