Browse Source

oeqa/gitarchive: Fix syntax warning

The backslash characters cause syntax warnings, mark the strings are raw
to avoid this.

(From OE-Core rev: abbe836162a24de5f22b38e8a2e547607e429820)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f717f61a37ed83618d054fc4017b5f5386fb2e3c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Richard Purdie 6 months ago
parent
commit
e35b91ea4d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      meta/lib/oeqa/utils/gitarchive.py

+ 1 - 1
meta/lib/oeqa/utils/gitarchive.py

@@ -146,7 +146,7 @@ def expand_tag_strings(repo, name_pattern, msg_subj_pattern, msg_body_pattern,
         keyws['tag_number'] = '{tag_number}'
         tag_re = format_str(name_pattern, keyws)
         # Replace parentheses for proper regex matching
-        tag_re = tag_re.replace('(', '\(').replace(')', '\)') + '$'
+        tag_re = tag_re.replace('(', r'\(').replace(')', r'\)') + '$'
         # Inject regex group pattern for 'tag_number'
         tag_re = tag_re.format(tag_number='(?P<tag_number>[0-9]{1,5})')