[glib: 1/4] glib-mkenums: Ignore other per value options than 'skip' and 'nick'
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/4] glib-mkenums: Ignore other per value options than 'skip' and 'nick'
- Date: Mon, 25 Jun 2018 13:11:57 +0000 (UTC)
commit c0e6fa4f19d2d048c7edb86388bcaed74ba64994
Author: Peter Kjellerstedt <pkj axis com>
Date: Sat Apr 28 03:07:50 2018 +0200
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
gobject/glib-mkenums.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index fe9a10756..de05232ce 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -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):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]