X Tutup
Skip to content

Commit c0fb66e

Browse files
committed
Add a trivial guard against using the same uuid twice
1 parent a965a31 commit c0fb66e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/list-discoverable-partitions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,16 @@ def generate(defines):
169169

170170
print(HEADER, end='')
171171

172+
uuids = set()
173+
172174
for type, arch, uuid in defines:
173175
tdesc = TYPES[type]
174176
adesc = '' if arch is None else f' ({ARCHITECTURES[arch]})'
175177

178+
# Let's make sure that we didn't select&paste the same value twice
179+
assert uuid not in uuids
180+
uuids.add(uuid)
181+
176182
if type != prevtype:
177183
prevtype = type
178184
morea, moreb = DESCRIPTIONS[type]

0 commit comments

Comments
 (0)
X Tutup