bolt-gen: formatting cleanups

add brackets for clarity when printing subtypes; also remove
unnecessary exception (`find_` will raise an exception if
the key is not present)
This commit is contained in:
lisa neigut
2019-07-23 16:37:55 -05:00
committed by Rusty Russell
parent 316edb39a4
commit ff82c918a5
2 changed files with 4 additions and 3 deletions

View File

@@ -130,9 +130,6 @@ class FieldSet(object):
field.add_count(int(count))
except ValueError:
len_field = self.find_data_field(count)
if not len_field:
raise ValueError("No length field found with name {} for {}:{}"
.format(count, self.name, field_name))
field.add_len_field(len_field)
self.len_fields[len_field.name] = len_field