From 4db8dfb773b7309f36673d2313615229f3cd9278 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 15 Jan 2004 11:25:04 +0000 Subject: [PATCH] Catch an exception uncaught before. --- plugins/Relay.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/Relay.py b/plugins/Relay.py index 9ac02ca35..d12d5ac0f 100644 --- a/plugins/Relay.py +++ b/plugins/Relay.py @@ -655,8 +655,13 @@ class Relay(callbacks.Privmsg, configurable.Mixin): if channel in self.channels: for otherIrc in self.ircs.itervalues(): if otherIrc != irc: - if otherIrc.state.getTopic(channel) != topic: - otherIrc.queueMsg(ircmsgs.topic(channel, topic)) + try: + if otherIrc.state.getTopic(channel) != topic: + otherIrc.queueMsg(ircmsgs.topic(channel,topic)) + except KeyError: + self.log.warning('Odd, not on %s on %s -- ' + 'Can\'t synchronize topics.', + channel, otherIrc.server) return msg