Prevented a possible raised exception in IrcMsgQueue.

This commit is contained in:
Jeremy Fincher 2003-11-17 08:35:50 +00:00
parent 688013de27
commit c37b775867
1 changed files with 3 additions and 1 deletions

View File

@ -167,7 +167,9 @@ class IrcMsgQueue(object):
else:
msg = None
if msg:
self.msgs.remove(msg)
if msg not in self.msgs:
debug.msg('Odd, dequeuing a message that\'s not in self.msgs.')
self.msgs.discard(msg)
return msg
def __nonzero__(self):