From 7324a05d3e12fffb4aaa00a8331651e5b9c85be0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 12 Jun 2019 15:36:59 +0100 Subject: [PATCH] WARN log (instead of exception) when we receive an unknown label --- modules/ircv3_labeled_responses.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ircv3_labeled_responses.py b/modules/ircv3_labeled_responses.py index a5c23757..36fe8b35 100644 --- a/modules/ircv3_labeled_responses.py +++ b/modules/ircv3_labeled_responses.py @@ -54,6 +54,10 @@ class Module(ModuleManager.BaseModule): self._recv(event["server"], label, event["batch"].get_lines()) def _recv(self, server, label, lines): + if not label in server._label_cache: + self.log.warn("unknown label received: %s", [label]) + return + cached = server._label_cache.pop(label) cached.events.on("labeled-response").call(lines=lines)