[KVM-AUTOTEST PATCH 10/14] KVM test: kvm_subprocess.py: use sys.executable instead of hardcoded 'python'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When running the server part of kvm_subprocess, use sys.executable instead of
'python'.  'python' might refer to a different Python version from the
currently running one, e.g. if autotest is executed using 'python26' instead
of the default python interpreter.

Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/kvm_subprocess.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/kvm_subprocess.py b/client/tests/kvm/kvm_subprocess.py
index 9222d33..2d70146 100755
--- a/client/tests/kvm/kvm_subprocess.py
+++ b/client/tests/kvm/kvm_subprocess.py
@@ -337,7 +337,7 @@ class kvm_spawn:
 
         # Start the server (which runs the command)
         if command:
-            sub = subprocess.Popen("python %s" % __file__,
+            sub = subprocess.Popen("%s %s" % (sys.executable, __file__),
                                    shell=True,
                                    stdin=subprocess.PIPE,
                                    stdout=subprocess.PIPE,
-- 
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux