summaryrefslogtreecommitdiff
path: root/gbp/rpm/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/rpm/__init__.py')
-rw-r--r--gbp/rpm/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index a4e6b791..63956804 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -111,11 +111,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',
@@ -622,7 +622,7 @@ class SpecFile(object):
if not tag['num'] in ignored:
tag_prev = self._delete_tag('patch', tag['num'])
# Remove a preceding comment if it seems to originate from GBP
- if re.match("^\s*#.*patch.*auto-generated",
+ if re.match(r"^\s*#.*patch.*auto-generated",
str(tag_prev), flags=re.I):
tag_prev = self._content.delete(tag_prev)
@@ -639,7 +639,7 @@ class SpecFile(object):
# Remove a preceding comment line if it ends with '.patch' or
# '.diff' plus an optional compression suffix
- if re.match("^\s*#.+(patch|diff)(\.(gz|bz2|xz|lzma))?\s*$",
+ if re.match(r"^\s*#.+(patch|diff)(\.(gz|bz2|xz|lzma))?\s*$",
str(macro_prev), flags=re.I):
macro_prev = self._content.delete(macro_prev)