Browse Source

pyln-proto: use vals for subtype parsing

bump-pyln-proto
niftynei 5 years ago
committed by Rusty Russell
parent
commit
c8579b99d0
  1. 2
      contrib/pyln-proto/pyln/proto/message/message.py

2
contrib/pyln-proto/pyln/proto/message/message.py

@ -305,7 +305,7 @@ other types. Since 'msgtype' is almost identical, it inherits from this too.
def read(self, io_in: BufferedIOBase, otherfields: Dict[str, Any]) -> Optional[Dict[str, Any]]: def read(self, io_in: BufferedIOBase, otherfields: Dict[str, Any]) -> Optional[Dict[str, Any]]:
vals = {} vals = {}
for field in self.fields: for field in self.fields:
val = field.fieldtype.read(io_in, otherfields) val = field.fieldtype.read(io_in, vals)
if val is None: if val is None:
# If first field fails to read, we return None. # If first field fails to read, we return None.
if field == self.fields[0]: if field == self.fields[0]:

Loading…
Cancel
Save