call sys.exit()
This commit is contained in:
parent
a978623004
commit
6e9747ae39
@ -19,6 +19,7 @@ import socket
|
|||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
import traceback
|
import traceback
|
||||||
|
import sys
|
||||||
|
|
||||||
from oyoyo.parse import parse_raw_irc_command
|
from oyoyo.parse import parse_raw_irc_command
|
||||||
|
|
||||||
@ -228,8 +229,7 @@ class IRCClient(object):
|
|||||||
if self.socket:
|
if self.socket:
|
||||||
logging.info('closing socket')
|
logging.info('closing socket')
|
||||||
self.socket.close()
|
self.socket.close()
|
||||||
import os
|
yield False
|
||||||
os._exit(0)
|
|
||||||
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)
|
||||||
@ -270,5 +270,6 @@ class IRCClient(object):
|
|||||||
conn = self.connect()
|
conn = self.connect()
|
||||||
while True:
|
while True:
|
||||||
if not next(conn):
|
if not next(conn):
|
||||||
break
|
print("Calling sys.exit()...")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user