Kaydet (Commit) cbd7d3db authored tarafından R. David Murray's avatar R. David Murray

Make the ctl-C shutdown of serve.py prettier.

üst e5d1c052
......@@ -28,5 +28,8 @@ if __name__ == '__main__':
path = sys.argv[1]
port = int(sys.argv[2]) if len(sys.argv) > 2 else 8000
httpd = simple_server.make_server('', port, app)
print "Serving %s on port %s" % (path, port)
httpd.serve_forever()
print "Serving %s on port %s, control-C to stop" % (path, port)
try:
httpd.serve_forever()
except KeyboardInterrupt:
print "\b\bShutting down."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment