stopping a cherrypy server over http
Posted
by d.c
on Stack Overflow
See other posts from Stack Overflow
or by d.c
Published on 2010-01-23T23:24:38Z
Indexed on
2010/03/23
7:53 UTC
Read the original article
Hit count: 398
I have a cherrypy app that I'm controlling over http with a wxpython ui. I want to kill the server when the ui closes, but I don't know how to do that. Right now I'm just doing a sys.exit() on the window close event but thats resulting in
Traceback (most recent call last):
File "ui.py", line 67, in exitevent
urllib.urlopen("http://"+server+"/?sigkill=1")
File "c:\python26\lib\urllib.py", line 87, in urlopen
return opener.open(url)
File "c:\python26\lib\urllib.py", line 206, in open
return getattr(self, name)(url)
File "c:\python26\lib\urllib.py", line 354, in open_http
'got a bad status line', None)
IOError: ('http protocol error', 0, 'got a bad status line', None)
is that because I'm not stopping cherrypy properly?
© Stack Overflow or respective owner