3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +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.""" """Shuts down the Pylink daemon."""
global tried_shutdown global tried_shutdown
if tried_shutdown: # We froze on shutdown last time, so immediately abort. if tried_shutdown: # We froze on shutdown last time, so immediately abort.
sys.exit(1) raise KeyboardInterrupt("Forcing shutdown.")
tried_shutdown = True tried_shutdown = True