forked from kate/uniborg
Use a reversed range instead of while
This commit is contained in:
parent
5b80fb7c5b
commit
5310c55a93
|
@ -79,9 +79,7 @@ class Uniborg(TelegramClient):
|
||||||
def remove_plugin(self, shortname):
|
def remove_plugin(self, shortname):
|
||||||
name = self._plugins[shortname].__name__
|
name = self._plugins[shortname].__name__
|
||||||
|
|
||||||
i = len(self._event_builders)
|
for i in reversed(range(len(self._event_builders))):
|
||||||
while i:
|
|
||||||
i -= 1
|
|
||||||
ev, cb = self._event_builders[i]
|
ev, cb = self._event_builders[i]
|
||||||
if cb.__module__ == name:
|
if cb.__module__ == name:
|
||||||
del self._event_builders[i]
|
del self._event_builders[i]
|
||||||
|
|
Loading…
Reference in New Issue