Catch KeyboardInterrupt cleanly

This commit is contained in:
Luke Murphy 2021-01-10 15:37:10 +01:00
parent a1479ed62f
commit b4a09497b8
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -99,7 +99,11 @@ class Bot(ClientXMPP):
def run(self):
"""Run the bot."""
self.connect()
try:
self.process()
except KeyboardInterrupt:
pass
def reply(self, to, body, type="chat"):
"""Send a message."""