From 715f6d151e0a42146aeb9c64af875cae6bb946e6 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 28 Nov 2002 06:55:57 +0000 Subject: [PATCH] handle KeyboardInterrupt nicely git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1385 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/scripts/roundup_server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roundup/scripts/roundup_server.py b/roundup/scripts/roundup_server.py index aa09755..fe11842 100644 --- a/roundup/scripts/roundup_server.py +++ b/roundup/scripts/roundup_server.py @@ -16,7 +16,7 @@ # """ HTTP Server that serves roundup. -$Id: roundup_server.py,v 1.15 2002-11-05 22:59:46 richard Exp $ +$Id: roundup_server.py,v 1.16 2002-11-28 06:55:57 richard Exp $ """ # python version check @@ -309,7 +309,10 @@ def run(): httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler) print _('Roundup server started on %(address)s')%locals() - httpd.serve_forever() + try: + httpd.serve_forever() + except KeyboardInterrupt: + print 'Keyboard Interrupt: exiting' if __name__ == '__main__': run() -- 2.30.2