comparison 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
comparison
equal deleted inserted replaced
1310:ff7b08d9ceb5 1311:7c9fda4a6692
14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
16 # 16 #
17 """ HTTP Server that serves roundup. 17 """ HTTP Server that serves roundup.
18 18
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 $
20 """ 20 """
21 21
22 # python version check 22 # python version check
23 from roundup import version_check 23 from roundup import version_check
24 24
307 if logfile: 307 if logfile:
308 sys.stdout = sys.stderr = open(logfile, 'a') 308 sys.stdout = sys.stderr = open(logfile, 'a')
309 309
310 httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler) 310 httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler)
311 print _('Roundup server started on %(address)s')%locals() 311 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'
313 316
314 if __name__ == '__main__': 317 if __name__ == '__main__':
315 run() 318 run()
316 319
317 # vim: set filetype=python ts=4 sw=4 et si 320 # vim: set filetype=python ts=4 sw=4 et si

Roundup Issue Tracker: http://roundup-tracker.org/