Commit 24a2d223 authored by Nicolas Dumazet's avatar Nicolas Dumazet

hardcoding is bad: use sys.executable instead of /usr/bin/python

(this caused obscure failures due to .pyc incompatibilities between 2.4 & >2.4)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29568 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 21ffcf8a
...@@ -31,6 +31,7 @@ from webdav.client import Resource ...@@ -31,6 +31,7 @@ from webdav.client import Resource
from App.config import getConfiguration from App.config import getConfiguration
import os import os
import shutil import shutil
import sys
from Acquisition import Implicit from Acquisition import Implicit
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
...@@ -451,8 +452,10 @@ class TemplateTool (BaseTool): ...@@ -451,8 +452,10 @@ class TemplateTool (BaseTool):
outfile = StringIO() outfile = StringIO()
if RESPONSE is not None: if RESPONSE is not None:
RESPONSE.setHeader('Content-type', 'text/plain') RESPONSE.setHeader('Content-type', 'text/plain')
process = os.popen('/usr/bin/python %s %s 2>&1' process = os.popen('%s %s %s 2>&1'
% (getUnitTestFile(), ' '.join(test_list))) % (sys.executable,
getUnitTestFile(),
' '.join(test_list)))
while 1: while 1:
try: try:
outfile.write(process.next()) outfile.write(process.next())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment