mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-10 04:02:32 +01:00
Fixed IndexError in Irc.removeCallback
This commit is contained in:
parent
f1823ef5f5
commit
7d44088223
@ -280,7 +280,7 @@ class Irc(object):
|
|||||||
toRemove.append(i)
|
toRemove.append(i)
|
||||||
if toRemove:
|
if toRemove:
|
||||||
for i in reviter(range(len(self.callbacks))):
|
for i in reviter(range(len(self.callbacks))):
|
||||||
if toRemove[-1] == i:
|
if toRemove and toRemove[-1] == i:
|
||||||
toRemove.pop()
|
toRemove.pop()
|
||||||
ret.append(self.callbacks.pop(i))
|
ret.append(self.callbacks.pop(i))
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
Reference in New Issue
Block a user