mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
glib-mkenums: Ignore other per value options than 'skip' and 'nick'
If some other per value option was present than 'skip' or 'nick' then a KeyError would occur. Ignoring such options matches the behaviour of the old, Perl-based glib-mkenums. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> https://gitlab.gnome.org/GNOME/glib/issues/1360
This commit is contained in:
parent
4993f2b7e5
commit
c0e6fa4f19
@ -218,7 +218,7 @@ def parse_entries(file, file_name):
|
||||
if options is not None:
|
||||
options = parse_trigraph(options)
|
||||
if 'skip' not in options:
|
||||
entries.append((name, value, options['nick']))
|
||||
entries.append((name, value, options.get('nick')))
|
||||
else:
|
||||
entries.append((name, value))
|
||||
elif re.match(r's*\#', line):
|
||||
|
Loading…
Reference in New Issue
Block a user