From 8b138ff808c451da4b7a024597f83ce8905ff8fd Mon Sep 17 00:00:00 2001 From: jcao219 Date: Thu, 18 Aug 2011 00:04:26 -0500 Subject: [PATCH] call sys.exit() --- oyoyo/client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/oyoyo/client.py b/oyoyo/client.py index f0370ca..c20a7f0 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -19,6 +19,7 @@ import socket import time import threading import traceback +import sys from oyoyo.parse import parse_raw_irc_command @@ -228,8 +229,7 @@ class IRCClient(object): if self.socket: logging.info('closing socket') self.socket.close() - import os - os._exit(0) + yield False def msg(self, user, msg): for line in msg.split('\n'): maxchars = 494 - len(self.nickname+self.ident+self.hostmask+user) @@ -270,5 +270,6 @@ class IRCClient(object): conn = self.connect() while True: if not next(conn): - break + print("Calling sys.exit()...") + sys.exit()