mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
glib-mkenums: Add default comment template if none is provided
The fallback code for providing a default comment template only worked if a template file was provided. It didn’t work if individual templates were provided on the command line (and --comment wasn’t). Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=788990
This commit is contained in:
parent
37c0610b4d
commit
fcfbaf8566
@ -281,10 +281,6 @@ def read_template_file(file):
|
||||
vtail = tmpl['value-tail']
|
||||
comment_tmpl = tmpl['comment']
|
||||
|
||||
# default to C-style comments
|
||||
if comment_tmpl == "":
|
||||
comment_tmpl = "/* \u0040comment\u0040 */"
|
||||
|
||||
parser = argparse.ArgumentParser(epilog=help_epilog,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
|
||||
@ -366,6 +362,9 @@ vtail = vtail + ''.join([unescape_cmdline_args(x) for x in options.vtail])
|
||||
|
||||
if options.comment_tmpl != '':
|
||||
comment_tmpl = unescape_cmdline_args(options.comment_tmpl)
|
||||
elif comment_tmpl == "":
|
||||
# default to C-style comments
|
||||
comment_tmpl = "/* \u0040comment\u0040 */"
|
||||
|
||||
output = options.output
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user