Skip to content

Commit 6ea019c

Browse files
authored
Merge pull request CloudBotIRC#135 from linuxdaemon/gonzobot+regex-hook-fix
Fix sanity checks for Iterables of regexes being added on a regex hook
2 parents 3637b20 + ade6df8 commit 6ea019c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cloudbot/hook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def add_hook(self, regex_param, kwargs):
102102
re_to_match = re.compile(re_to_match)
103103
else:
104104
# make sure that the param is either a compiled regex, or has a search attribute.
105-
assert hasattr(regex_param, "search")
105+
assert hasattr(re_to_match, "search")
106106
self.regexes.append(re_to_match)
107107

108108

0 commit comments

Comments
 (0)