From 615238d0a46bcce8fa7109c7d6653f5fbf239e24 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 15 Jul 2017 15:26:54 +0200 Subject: [PATCH] mkenums: make string raw for real regex Signed-off-by: Igor Gnatenko --- gobject/glib-mkenums.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in index e78a04631..08224ef15 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -84,7 +84,7 @@ def parse_entries(file, file_name): continue if looking_for_name: - m = re.match('\s*(\w+)', line) + m = re.match(r'\s*(\w+)', line) if m: enumname = m.group(1) return True @@ -141,7 +141,7 @@ def parse_entries(file, file_name): entries.append((name, value, options['nick'])) else: entries.append((name, value)) - elif re.match('s*\#', line): + elif re.match(r's*\#', line): pass else: sys.exit("Failed to parse %s." % file_name)