From 754978850c5349eedb8fac4059e1c50fbc2bc2c6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 11 Nov 2003 11:37:17 +0000 Subject: [PATCH] Give a proper error message for possibly uncaught exception: bug #839653. --- plugins/Relay.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/Relay.py b/plugins/Relay.py index b1e1c4619..02754dee0 100644 --- a/plugins/Relay.py +++ b/plugins/Relay.py @@ -298,7 +298,12 @@ class Relay(callbacks.Privmsg, plugins.Configurable): voices = [] usersS = [] if abbreviation != self.abbreviations[realIrc]: - Channel = otherIrc.state.channels[channel] + try: + Channel = otherIrc.state.channels[channel] + except KeyError: + s = 'Somehow I\'m not in %s on %s.'%(channel,abbreviation)) + irc.error(msg, s) + return for s in Channel.users: s = s.strip() if not s: