forked from github/pelican
Adding a message for gracefully shutting down dev server
This commit is contained in:
parent
7fa0d3063d
commit
66aae01493
1 changed files with 5 additions and 1 deletions
|
|
@ -22,4 +22,8 @@ except OSError as e:
|
|||
|
||||
|
||||
print("serving at port", PORT)
|
||||
httpd.serve_forever()
|
||||
try:
|
||||
httpd.serve_forever()
|
||||
except KeyboardInterrupt as e:
|
||||
print("shutting down server")
|
||||
httpd.socket.close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue