]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
scripts/runqemu: fix regex escape sequences
authorTrevor Gamblin <tgamblin@baylibre.com>
Tue, 2 Jan 2024 16:52:58 +0000 (11:52 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Jan 2024 22:50:59 +0000 (22:50 +0000)
commit0e8a4142bb90a92d175df6b2537d24a372356f98
tree3591cc6d20216cac3451d319f742620b6d36d39a
parent2c7bf9c8a833bec13a1ebabdce30933cbe691108
scripts/runqemu: fix regex escape sequences

When invoking runqemu with Python 3.12, the following warning is
encountered:

|SyntaxWarning: invalid escape sequence '\.'

This is because the interpreter scans the string before it is processed
by the regex module, and it interprets the backslash as part of an
escape sequence, but not a standard one. This will be registered as an
error rather than a warning in future Python versions. To avoid the it,
simply add an extra backslash so that Python doesn't misinterpret the
string, while the regex parser still sees an escaped '.' character.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu