Skip to content

Commit 0146c24

Browse files
author
Richard Jones
committed
handle KeyboardInterrupt nicely
1 parent c93ad6d commit 0146c24

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roundup/scripts/roundup_server.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
""" HTTP Server that serves roundup.
1818
19-
$Id: roundup_server.py,v 1.15 2002-11-05 22:59:46 richard Exp $
19+
$Id: roundup_server.py,v 1.16 2002-11-28 06:55:57 richard Exp $
2020
"""
2121

2222
# python version check
@@ -309,7 +309,10 @@ def run():
309309

310310
httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler)
311311
print _('Roundup server started on %(address)s')%locals()
312-
httpd.serve_forever()
312+
try:
313+
httpd.serve_forever()
314+
except KeyboardInterrupt:
315+
print 'Keyboard Interrupt: exiting'
313316

314317
if __name__ == '__main__':
315318
run()

0 commit comments

Comments
 (0)