#958: Autoreload fails in the execv call in Jython (CherryPy 3.1.2, Jython 2.5.0)
----------------------------------------+-----------------------------------
Reporter:
jeremy.o...@gmail.com | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone:
Component: CherryPy code | Keywords:
----------------------------------------+-----------------------------------
The current reload mechanism depends on the existence of os.execv, which
isn't part of the standard Jython distribution. Working patch code
attached.
[cherrypy/process/wspbus.py:304]
if sys.platform[:4] == 'java':
from _systemrestart import SystemRestart
raise SystemRestart
else:
args = sys.argv[:]
self.log('Re-spawning %s' % ' '.join(args))
args.insert(0, sys.executable)
if sys.platform == 'win32':
args = ['"%s"' % arg for arg in args]
os.execv(sys.executable, args)
--
Ticket URL: <
http://www.cherrypy.org/ticket/958>
CherryPy <
http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework