Spawn gevent using same python executable

Solves issues of spawning wrong version of python or popping out of virtualenv
This commit is contained in:
Sandy 2014-06-13 10:39:57 -04:00
parent 5e7485abb9
commit 8d538fc33a
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ class PreforkServer(CommonServer):
cmd = nargs[0]
cmd = os.path.join(os.path.dirname(cmd), "openerp-gevent")
nargs[0] = cmd
popen = subprocess.Popen(nargs)
popen = subprocess.Popen([sys.executable] + nargs)
self.long_polling_pid = popen.pid
def worker_pop(self, pid):