Mercurial > p > roundup > code
diff roundup/scripts/roundup_server.py @ 1311:7c9fda4a6692
handle KeyboardInterrupt nicely
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 28 Nov 2002 06:55:57 +0000 |
| parents | b2d04ce03802 |
| children | b0d342a3548f |
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py Sun Nov 17 08:00:33 2002 +0000 +++ b/roundup/scripts/roundup_server.py Thu Nov 28 06:55:57 2002 +0000 @@ -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 @@ 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()
