combo-layer: Fix deprecation warnings

Tweak to avoid warnings with newer python versions.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2024-12-31 14:45:45 +00:00
parent 57202929a8
commit 64263cc454

View File

@ -328,7 +328,7 @@ def action_init(conf, args):
if since_rev:
committer = runcmd('git var GIT_AUTHOR_IDENT').strip()
# Same time stamp, no name.
author = re.sub('.* (\d+ [+-]\d+)', r'unknown <unknown> \1', committer)
author = re.sub(r'.* (\d+ [+-]\d+)', r'unknown <unknown> \1', committer)
logger.info('author %s' % author)
for rev in since_rev.split():
# Resolve in component repo...
@ -483,7 +483,7 @@ def check_repo_clean(repodir):
exit if repo is dirty
"""
output=runcmd("git status --porcelain", repodir)
r = re.compile('\?\? patch-.*/')
r = re.compile(r'\?\? patch-.*/')
dirtyout = [item for item in output.splitlines() if not r.match(item)]
if dirtyout:
logger.error("git repo %s is dirty, please fix it first", repodir)