Code

handle KeyboardInterrupt nicely
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 28 Nov 2002 06:55:57 +0000 (06:55 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 28 Nov 2002 06:55:57 +0000 (06:55 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1385 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/scripts/roundup_server.py

index aa0975529838ed2b4476efbd276735335adf55a8..fe118423484b6f096d0dd1841ff10d8c7d1599fa 100644 (file)
@@ -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()