tools/generate-wire.py: don't define empty enums.

For bolt 13, we have no message types, just a TLV.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2020-05-02 20:10:16 +09:30
parent 39d5117210
commit ae7485d2ac

View File

@ -512,10 +512,11 @@ class Master(object):
def write(self, options, output): def write(self, options, output):
template = self.find_template(options) template = self.find_template(options)
enum_sets = [] enum_sets = []
enum_sets.append({ if len(self.messages.values()) != 0:
'name': options.enum_name, enum_sets.append({
'set': self.messages.values(), 'name': options.enum_name,
}) 'set': self.messages.values(),
})
stuff = {} stuff = {}
stuff['top_comments'] = self.top_comments stuff['top_comments'] = self.top_comments
stuff['options'] = options stuff['options'] = options