3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-17 23:52:49 +01:00

control: raise KeyboardInterrupt to speed up forced shutdowns?

This commit is contained in:
James Lu 2017-03-26 14:44:04 -07:00
parent d6243d9f89
commit 55873416a1

View File

@ -23,7 +23,7 @@ def _shutdown(irc=None):
"""Shuts down the Pylink daemon."""
global tried_shutdown
if tried_shutdown: # We froze on shutdown last time, so immediately abort.
sys.exit(1)
raise KeyboardInterrupt("Forcing shutdown.")
tried_shutdown = True