diff mbox series

[styhead,11/12] oeqa/gitarchive: Fix syntax warning

Message ID d6912b043a816c47569ae40e058e9c2966a20211.1738965898.git.steve@sakoman.com
State Accepted
Delegated to: Steve Sakoman
Headers show
Series [styhead,01/12] libnsl2: set CVE_PRODUCT | expand

Commit Message

Steve Sakoman Feb. 7, 2025, 10:06 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

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

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>
---
 meta/lib/oeqa/utils/gitarchive.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index a826646059..7e1d505748 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/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})')