From af91571207e5e7bf6affa38355ac0631269f2bb4 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Wed, 17 Aug 2011 23:52:04 -0500 Subject: [PATCH] use os._exit --- oyoyo/client.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/oyoyo/client.py b/oyoyo/client.py index df4d73a..7d51a20 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -228,7 +228,8 @@ class IRCClient(object): if self.socket: logging.info('closing socket') self.socket.close() - raise SystemExit + import os + os._exit() def msg(self, user, msg): for line in msg.split('\n'): maxchars = 494 - len(self.nickname+self.ident+self.hostmask+user) @@ -268,8 +269,6 @@ class IRCClient(object): def mainLoop(self): conn = self.connect() while True: - try: - next(conn) - except: - return + if not next(conn): + break