From 717ee92e415c560212cdc38109a75a8fafbe5c64 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 3 Feb 2004 07:11:32 +0000 Subject: [PATCH] Catch exceptions in dying callbacks so all callbacks get a chance to die. --- src/irclib.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/irclib.py b/src/irclib.py index e3f3f498b..ec2fc715f 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -667,8 +667,11 @@ class Irc(IrcCommandDispatcher): """Makes the Irc object die. Dead.""" log.info('Irc object for %s dying.' % self.server) if self in world.ircs: - for callback in self.callbacks: - callback.die() + for cb in self.callbacks: + try: + cb.die() + except Exception, e: + log.exception('Uncaught exception in %s.die:', cb.name()) world.ircs.remove(self) else: log.warning('Irc object killed twice.')