From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Goldish Subject: [KVM-AUTOTEST PATCH 10/14] KVM test: kvm_subprocess.py: use sys.executable instead of hardcoded 'python' Date: Sun, 13 Jun 2010 17:33:41 +0300 Message-ID: <1276439625-32472-10-git-send-email-mgoldish@redhat.com> References: <1276439625-32472-1-git-send-email-mgoldish@redhat.com> <1276439625-32472-2-git-send-email-mgoldish@redhat.com> <1276439625-32472-3-git-send-email-mgoldish@redhat.com> <1276439625-32472-4-git-send-email-mgoldish@redhat.com> <1276439625-32472-5-git-send-email-mgoldish@redhat.com> <1276439625-32472-6-git-send-email-mgoldish@redhat.com> <1276439625-32472-7-git-send-email-mgoldish@redhat.com> <1276439625-32472-8-git-send-email-mgoldish@redhat.com> <1276439625-32472-9-git-send-email-mgoldish@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1276439625-32472-9-git-send-email-mgoldish@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org 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 --- 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