]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
feature-microblaze-versions.inc: python 3.12 regex
authorAdrian Freihofer <adrian.freihofer@gmail.com>
Sat, 10 Feb 2024 13:15:56 +0000 (14:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Feb 2024 13:51:38 +0000 (13:51 +0000)
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.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
feature-microblaze-versions.inc#

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/machine/include/microblaze/feature-microblaze-versions.inc

index 5c37f49abb7d3445b8f30e672020ef9ecb85c703..658e87b8cdbb987da4508d2f1aa6522518c38542 100644 (file)
@@ -16,7 +16,7 @@ def microblaze_current_version(d, gcc = False):
     # find the current version, and convert it to major/minor integers
     version = None
     for t in (d.getVar("TUNE_FEATURES") or "").split():
-        m = re.search("^v(\d+)\.(\d+)", t)
+        m = re.search(r"^v(\d+)\.(\d+)", t)
         if m:
             version = int(m.group(1)), int(m.group(2))
             break