http server kill socket
This commit is contained in:
parent
032a559b3b
commit
06e9216972
@ -557,7 +557,12 @@ def main():
|
||||
|
||||
print('Start server on http://localhost:9000')
|
||||
# gracefully handle interrupt here
|
||||
try:
|
||||
httpd.serve_forever()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
print('shutdown')
|
||||
httpd.socket.close()
|
||||
raise
|
||||
|
||||
if arguments['deploy']:
|
||||
error(os.system("which rsync > /dev/null") == 0, "I can't locate the rsync, "
|
||||
|
Loading…
x
Reference in New Issue
Block a user