mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
Add a trivial guard against using the same uuid twice
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user