Catch KeyboardInterrupt cleanly
This commit is contained in:
parent
a1479ed62f
commit
b4a09497b8
@ -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."""
|
||||
|
Reference in New Issue
Block a user