Skip to content

Commit 66fec7e

Browse files
committed
Forgot to chain lists of hooks before sorting
1 parent 6842e01 commit 66fec7e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cloudbot/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import logging
66
import os
77
import re
8+
from itertools import chain
89

910
import sqlalchemy
1011

@@ -232,7 +233,7 @@ def load_plugin(self, path):
232233
self.regex_hooks.sort(key=lambda x: x[1].priority)
233234
dicts_of_lists_of_hooks = (self.event_type_hooks, self.raw_triggers)
234235
lists_of_hooks = [self.catch_all_triggers, self.sieves]
235-
lists_of_hooks.extend(d.values() for d in dicts_of_lists_of_hooks)
236+
lists_of_hooks.extend(chain.from_iterable(d.values() for d in dicts_of_lists_of_hooks))
236237

237238
for lst in lists_of_hooks:
238239
lst.sort(key=lambda x: x.priority)

0 commit comments

Comments
 (0)