|
[Webware-checkins] r2229 - WSGIKit/trunk/wsgikit
From: <ianb@co...> - 2005-03-26 06:02
|
Author: ianb
Date: 2005-03-25 23:02:39 -0700 (Fri, 25 Mar 2005)
New Revision: 2229
Modified:
WSGIKit/trunk/wsgikit/server.py
Log:
catch the exceptions from ^C
Modified: WSGIKit/trunk/wsgikit/server.py
===================================================================
--- WSGIKit/trunk/wsgikit/server.py 2005-03-26 05:52:39 UTC (rev 2228)
+++ WSGIKit/trunk/wsgikit/server.py 2005-03-26 06:02:39 UTC (rev 2229)
@@ -71,14 +71,21 @@
from wsgikit import reloader
if conf.verbose:
print "Running reloading file monitor"
- reloader.install()
+ reloader.install(conf.get('reload_interval', 1), False)
else:
- return restart_with_reloader(conf)
+ try:
+ return restart_with_reloader(conf)
+ except KeyboardInterrupt:
+ return 0
server = servers[conf.server]
app = make_app(conf)
if conf.verbose:
print "Starting server."
- server(conf, app)
+ try:
+ server(conf, app)
+ except KeyboardInterrupt:
+ # This is an okay error
+ pass
return 0
def load_conf(conf, filename, default=False):
|
| Thread | Author | Date |
|---|---|---|
| [Webware-checkins] r2229 - WSGIKit/trunk/wsgikit | <ianb@co...> |