Properly fix SIGINT
This commit is contained in:
parent
bf916e83fd
commit
b3697b0ba6
@ -3,6 +3,7 @@
|
||||
|
||||
import sys
|
||||
import time
|
||||
import signal
|
||||
import re
|
||||
import sleekxmpp
|
||||
from irc.bot import SingleServerIRCBot
|
||||
@ -285,7 +286,9 @@ if __name__ == '__main__':
|
||||
xmpp_opts['muc'] = config.get('XMPP', 'muc')
|
||||
xmpp_opts['nick'] = config.get('XMPP', 'nick')
|
||||
|
||||
try:
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
|
||||
while True:
|
||||
inter = Intermedia(shared_opts, irc_opts['chan'], xmpp_opts['muc'])
|
||||
ircbot = IRCBot(irc_opts, inter)
|
||||
xmppbot = XMPPBot(xmpp_opts, inter)
|
||||
@ -303,5 +306,3 @@ if __name__ == '__main__':
|
||||
|
||||
irc_thread.join()
|
||||
xmpp_thread.join()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
print('Exit')
|
||||
|
Loading…
Reference in New Issue
Block a user