Commits

Hiroyoshi Komatsu committed 73cde38

Handle KeyboardInterrupt when server running

  • Participants
  • Parent commits fa29090

Comments (0)

Files changed (1)

 
     print 'Serving on http://%s:%s' % (options.host, options.port)
     # server.serve()
-    server.serve_forever()
+    try:
+        server.serve_forever()
+    except KeyboardInterrupt:
+        print >>stderr, "Bye."
+        exit()