We don't need to enumerate hooks (github)

This commit is contained in:
jesopo 2019-02-04 10:17:15 +00:00
parent 36e838d585
commit 66d2ef2c26

View file

@ -261,8 +261,7 @@ class Module(ModuleManager.BaseModule):
targets = [] targets = []
repo_hooked = False repo_hooked = False
for i, (server_id, channel_name, hooked_repos) in list( for server_id, channel_name, hooked_repos) in hooks:
enumerate(hooks))[::-1]:
found_hook = None found_hook = None
if repo_username and repo_username in hooked_repos: if repo_username and repo_username in hooked_repos:
found_hook = hooked_repos[repo_username] found_hook = hooked_repos[repo_username]