From 605ef6f5a292fe169b1469b0a8996f3d5ae53daf Mon Sep 17 00:00:00 2001 From: Adrian Freihofer Date: Sat, 10 Feb 2024 14:15:54 +0100 Subject: scripts: python 3.12 regex All the regexes throw a warning like this: WARNING: scripts/lib/recipetool/create_buildsys.py:140: SyntaxWarning: invalid escape sequence '\s' proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80) Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie --- scripts/combo-layer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/combo-layer') diff --git a/scripts/combo-layer b/scripts/combo-layer index 2312cef9ac..4a715914af 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -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) -- cgit v1.2.3-54-g00ecf