From 38d1f337a934ba04290344bf0f268fc1d49bc3e0 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sun, 19 Dec 2021 15:15:14 +0100 Subject: [PATCH] historian: Do not crash if we get an unknown address type --- historian/gossipd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/historian/gossipd.py b/historian/gossipd.py index 41fb5e5..c5d1031 100644 --- a/historian/gossipd.py +++ b/historian/gossipd.py @@ -235,7 +235,8 @@ def parse_address(b): elif a.typ == 4: a.addr = b.read(35) else: - raise ValueError("Unknown address type {typ}".format(typ=a.typ)) + print(f"Unknown address type {a.typ}") + return None a.port, = struct.unpack("!H", b.read(2)) return a