Message ID | 20241203134331.95402-1-richard.purdie@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | oeqa/gitarchive: Fix syntax warning | expand |
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py index a826646059a..7e1d5057482 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})')
The backslash characters cause syntax warnings, mark the strings are raw to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/lib/oeqa/utils/gitarchive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)