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