Gracefully handle KeyboardInterrupt being thrown when shutting down

This commit is contained in:
2018-12-11 12:48:59 +01:00
parent dcc360179e
commit f3f37aafae

View File

@@ -176,6 +176,8 @@ def main():
except asyncio.TimeoutError:
log.debug("Timeout waiting for may-I-run task, "
"but that's fine as we're shutting down.")
except KeyboardInterrupt:
log.info('Keyboard interrupt while shutting down, ignoring as we are shutting down.')
fworker.shutdown()