mkenums: pass string for re.sub() for real

Signed-off-by: Igor Gnatenko <ignatenko@src.gnome.org>
This commit is contained in:
Igor Gnatenko 2017-07-15 15:31:05 +02:00
parent 1a182df5d1
commit a882c974d3

View File

@ -395,7 +395,7 @@ def process_file(curfilename):
# canonicalize user defined prefixes # canonicalize user defined prefixes
enum_prefix = enum_prefix.upper() enum_prefix = enum_prefix.upper()
enum_prefix = enum_prefix.replace('-', '_') enum_prefix = enum_prefix.replace('-', '_')
enum_prefix = re.sub(r'(.*)([^_])$', r'\1\2_') enum_prefix = re.sub(r'(.*)([^_])$', r'\1\2_', enum_prefix)
fixed_entries = [] fixed_entries = []
for e in entries: for e in entries: