Catch-and-bury utils.EventError in auto-github code

This commit is contained in:
jesopo 2019-05-16 14:25:37 +01:00
parent 54e8fc8029
commit ce1558e48b

View file

@ -228,7 +228,10 @@ class Module(ModuleManager.BaseModule):
def channel_message(self, event): def channel_message(self, event):
match = REGEX_ISSUE.search(event["message"]) match = REGEX_ISSUE.search(event["message"])
if match and event["channel"].get_setting("auto-github", False): if match and event["channel"].get_setting("auto-github", False):
try:
result = self._get_info(event["channel"], match.group(0)) result = self._get_info(event["channel"], match.group(0))
except utils.EventError:
return
if result: if result:
hide_prefix = channel.get_setting("github-hide-prefix", False) hide_prefix = channel.get_setting("github-hide-prefix", False)
self.events.on("send.stdout").call(target=event["channel"], self.events.on("send.stdout").call(target=event["channel"],