]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Revert another part of ""Revert "Fix the use of ./xtf-runner on Python 2.4""
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 4 Dec 2019 12:17:59 +0000 (12:17 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 4 Dec 2019 12:22:04 +0000 (12:22 +0000)
subprocess.check_output() is Python 2.7 only.

Reported-by: Glenn Enright <glenn@rimuhosting.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xtf-runner

index 2a8df0c24acc5bd0b8f3137a814a4aceb10cb515..1863eadc9107c57ae63e6eaa32545afb28b8fba1 100755 (executable)
@@ -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