mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-06-04 14:41:42 +00:00
Check for duplicate ids in update-source-catalog.
This commit is contained in:
parent
8f8fc220c7
commit
1b87b238ea
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -1,6 +1,7 @@
|
|||||||
livecd-rootfs (2.737) UNRELEASED; urgency=medium
|
livecd-rootfs (2.737) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
* Generate source catalogs for the desktop canary build.
|
* Generate source catalogs for the desktop canary build.
|
||||||
|
* Check for duplicate ids in update-source-catalog.
|
||||||
|
|
||||||
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 13 Sep 2021 09:52:06 +1200
|
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 13 Sep 2021 09:52:06 +1200
|
||||||
|
|
||||||
|
@ -51,15 +51,19 @@ for mo in glob.glob(os.path.join(opts.translations, '*.mo')):
|
|||||||
output.append(template)
|
output.append(template)
|
||||||
|
|
||||||
default_count = 0
|
default_count = 0
|
||||||
|
ids = set()
|
||||||
for entry in output:
|
for entry in output:
|
||||||
if entry.get('default', False):
|
if entry.get('default', False):
|
||||||
default_count += 1
|
default_count += 1
|
||||||
|
ids.add(entry['id'])
|
||||||
|
|
||||||
|
|
||||||
if default_count > 1:
|
if default_count > 1:
|
||||||
print("Too many defaults in source catalog!")
|
print("Too many defaults in source catalog!")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
if len(ids) != len(output):
|
||||||
|
print("Non unique ids in %s!" % output)
|
||||||
|
|
||||||
with open(opts.output, 'w') as fp:
|
with open(opts.output, 'w') as fp:
|
||||||
yaml.dump(output, fp)
|
yaml.dump(output, fp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user