Author: chrisz
Date: Sat Apr 8 15:18:34 2006
New Revision: 5016
Modified:
Webware/trunk/WebKit/ThreadedAppServer.py
Log:
Made interrupt handling compatible with the new Python 2.5 exception hierarchy (PEP 352).
Modified: Webware/trunk/WebKit/ThreadedAppServer.py
==============================================================================
--- Webware/trunk/WebKit/ThreadedAppServer.py (original)
+++ Webware/trunk/WebKit/ThreadedAppServer.py Sat Apr 8 15:18:34 2006
@@ -874,11 +874,14 @@
print "Exiting AppServer%s." % (
e[0] == 3 and ' for reload' or '')
exitStatus = e[0]
+ except KeyboardInterrupt:
+ print
+ print "Exiting AppServer due to keyboard interrupt."
+ exitStatus = 0
except Exception, e:
- if (isinstance(e, KeyboardInterrupt) or
- (isinstance(e, IOError) and e[0] == errno.EINTR)):
+ if isinstance(e, IOError) and e[0] == errno.EINTR:
print
- print "Exiting AppServer due to keyboard interrupt."
+ print "Exiting AppServer due to interrupt signal."
exitStatus = 0
else:
if doesRunHandleExceptions:
|