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): def run(self):
"""Run the bot.""" """Run the bot."""
self.connect() self.connect()
self.process()
try:
self.process()
except KeyboardInterrupt:
pass
def reply(self, to, body, type="chat"): def reply(self, to, body, type="chat"):
"""Send a message.""" """Send a message."""