Add a trivial guard against using the same uuid twice

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-11-19 17:26:36 +01:00
parent a965a3191e
commit c0fb66ec30

View file

@ -169,10 +169,16 @@ def generate(defines):
print(HEADER, end='')
uuids = set()
for type, arch, uuid in defines:
tdesc = TYPES[type]
adesc = '' if arch is None else f' ({ARCHITECTURES[arch]})'
# Let's make sure that we didn't select&paste the same value twice
assert uuid not in uuids
uuids.add(uuid)
if type != prevtype:
prevtype = type
morea, moreb = DESCRIPTIONS[type]