chiark / gitweb /
Escape: Add missing r in regexp literals ('...' => r'...') [7]
[git-buildpackage.git] / gbp / rpm / __init__.py
index b37dfdabeeae5423f8e63524844add61fe7a0b50..0048af490ea72a04ac9b762bcd20cd8bc7d09f69 100644 (file)
@@ -115,11 +115,11 @@ class SrcRpmFile(object):
 class SpecFile(object):
     """Class for parsing/modifying spec files"""
     tag_re = re.compile(r'^(?P<name>[a-z]+)(?P<num>[0-9]+)?\s*:\s*'
-                        '(?P<value>\S(.*\S)?)\s*$', flags=re.I)
+                        r'(?P<value>\S(.*\S)?)\s*$', flags=re.I)
     directive_re = re.compile(r'^%(?P<name>[a-z]+)(?P<num>[0-9]+)?'
-                              '(\s+(?P<args>.*))?$', flags=re.I)
+                              r'(\s+(?P<args>.*))?$', flags=re.I)
     gbptag_re = re.compile(r'^\s*#\s*gbp-(?P<name>[a-z-]+)'
-                           '(\s*:\s*(?P<args>\S.*))?$', flags=re.I)
+                           r'(\s*:\s*(?P<args>\S.*))?$', flags=re.I)
     # Here "sections" stand for all scripts, scriptlets and other directives,
     # but not macros
     section_identifiers = ('package', 'description', 'prep', 'build', 'install',