use os._exit
This commit is contained in:
parent
abf194b92b
commit
037d13cecb
@ -228,7 +228,8 @@ class IRCClient(object):
|
|||||||
if self.socket:
|
if self.socket:
|
||||||
logging.info('closing socket')
|
logging.info('closing socket')
|
||||||
self.socket.close()
|
self.socket.close()
|
||||||
raise SystemExit
|
import os
|
||||||
|
os._exit()
|
||||||
def msg(self, user, msg):
|
def msg(self, user, msg):
|
||||||
for line in msg.split('\n'):
|
for line in msg.split('\n'):
|
||||||
maxchars = 494 - len(self.nickname+self.ident+self.hostmask+user)
|
maxchars = 494 - len(self.nickname+self.ident+self.hostmask+user)
|
||||||
@ -268,8 +269,6 @@ class IRCClient(object):
|
|||||||
def mainLoop(self):
|
def mainLoop(self):
|
||||||
conn = self.connect()
|
conn = self.connect()
|
||||||
while True:
|
while True:
|
||||||
try:
|
if not next(conn):
|
||||||
next(conn)
|
break
|
||||||
except:
|
|
||||||
return
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user