exit quietly when user hits ctrl+C
This commit is contained in:
parent
b8cb1a3e97
commit
b71a3e2a0b
1 changed files with 3 additions and 0 deletions
3
local.py
3
local.py
|
@ -190,4 +190,7 @@ if __name__ == '__main__':
|
|||
server.serve_forever()
|
||||
except socket.error, e:
|
||||
logging.error(e)
|
||||
except KeyboardInterrupt:
|
||||
server.shutdown()
|
||||
sys.exit(0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue