[gobject-introspection] sectionparser: Fix regex matching



commit 40623576a2558fda814c0dcf135d397b8674f420
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Mar 27 15:48:50 2013 -0400

    sectionparser: Fix regex matching
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699856

 giscanner/sectionparser.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/giscanner/sectionparser.py b/giscanner/sectionparser.py
index 042a753..6230b5c 100644
--- a/giscanner/sectionparser.py
+++ b/giscanner/sectionparser.py
@@ -56,17 +56,17 @@ def parse_sections_file(lines):
             current_section = None
             continue
 
-        match = re.match(line, r"<FILE>(?P<contents>.*)</FILE>")
+        match = re.match(r"<FILE>(?P<contents>.*)</FILE>", line)
         if match:
             current_section.file = match.groupdict['contents']
             continue
 
-        match = re.match(line, r"<TITLE>(?P<contents>.*)</TITLE>")
+        match = re.match(r"<TITLE>(?P<contents>.*)</TITLE>", line)
         if match:
             current_section.title = match.groupdict['contents']
             continue
 
-        match = re.match(line, r"<SUBSECTION (?P<name>).*>")
+        match = re.match(r"<SUBSECTION (?P<name>).*>", line)
         if match:
             current_subsection = Subsection(match.groupdict['name'])
             current_section.subsections.append(current_subsection)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]