From 2309a7a561d60e17af131984b03fb5f49421a89e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 14 Jun 2020 17:25:49 +0930 Subject: [PATCH] pyln.proto.message: don't leave 'None' in dict for missing fields. Signed-off-by: Rusty Russell --- contrib/pyln-proto/pyln/proto/message/message.py | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/pyln-proto/pyln/proto/message/message.py b/contrib/pyln-proto/pyln/proto/message/message.py index 1b8d8f37f..02af803f1 100644 --- a/contrib/pyln-proto/pyln/proto/message/message.py +++ b/contrib/pyln-proto/pyln/proto/message/message.py @@ -592,6 +592,7 @@ Returns None on EOF if fields[f.name] is None: # optional fields are OK to be missing at end! if f.option is not None: + del fields[f.name] break raise ValueError('{}: truncated at field {}' .format(mtype, f.name))