WARN log (instead of exception) when we receive an unknown label

This commit is contained in:
jesopo 2019-06-12 15:36:59 +01:00
parent 568f6d7d33
commit 7324a05d3e

View file

@ -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)