From cf4b0da422e4576effcc47f2cb89c828968dc044 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 12 Feb 2004 07:18:21 +0000 Subject: [PATCH] Fix possible raised RuntimeError. --- src/Admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Admin.py b/src/Admin.py index f326ad29a..186973770 100755 --- a/src/Admin.py +++ b/src/Admin.py @@ -204,10 +204,14 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg): irc.error('I\'m not currently in %s' % arg) return for arg in args: + L = [] for channelWithPass in conf.supybot.channels(): channel = channelWithPass.split(',')[0] if arg == channel: - conf.supybot.channels().remove(channelWithPass) + L.append(channelWithPass) + # This is necessary so the set doesn't change size while iterating. + for channel in L: + conf.supybot.channels().remove(channel) irc.queueMsg(ircmsgs.parts(args, msg.nick)) def disable(self, irc, msg, args):