From 63232c0fb26e4c44db4ed0fbf58b8504c66eaf04 Mon Sep 17 00:00:00 2001 From: Peter Sebastian Nordholt <6916414+GuutBoy@users.noreply.github.com> Date: Thu, 4 Feb 2021 08:13:01 +0100 Subject: [PATCH] Fix handling of ignored messages in historian.py Fixes a bug where gossip messages that are ignored by the historian plugin will trigger an exception being printed. --- historian/historian.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/historian/historian.py b/historian/historian.py index f42f75c..2cb3c6c 100755 --- a/historian/historian.py +++ b/historian/historian.py @@ -161,10 +161,13 @@ class Flusher(Thread): elif isinstance(msg, gossipd.NodeAnnouncement): cls = NodeAnnouncement + + else: + return; self.session.merge(cls.from_gossip(msg, raw)) except Exception as e: - print("Exception parsing gossip message:", e) + logging.warn("Exception parsing gossip message:", e) @plugin.init()