Catch a KeyError when trying to remove a non-existent herald.

This commit is contained in:
James Vega 2004-09-01 18:51:32 +00:00
parent 847a98c8c0
commit 3aafc97a7f

View File

@ -229,8 +229,11 @@ class Herald(callbacks.Privmsg):
except KeyError:
irc.errorNoUser()
return
del self.db[channel, id]
irc.replySuccess()
try:
del self.db[channel, id]
irc.replySuccess()
except KeyError:
irc.error('I have no herald for that user.')
def change(self, irc, msg, args):
"""[<channel>] <user|nick|hostmask> <regexp>