mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
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: 63998f13d5263ce19a60ed3fba1ac8b6f23558e3)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Backported from master: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
95b1e23223
commit
0269cfc91c
@@ -324,8 +324,8 @@ def get_signatures(builddir, failsafe=False, machine=None, extravars=None):
|
||||
else:
|
||||
raise
|
||||
|
||||
sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$")
|
||||
tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")
|
||||
sig_regex = re.compile(r"^(?P<task>.*:.*):(?P<hash>.*) .$")
|
||||
tune_regex = re.compile(r"(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")
|
||||
current_tune = None
|
||||
with open(sigs_file, 'r') as f:
|
||||
for line in f.readlines():
|
||||
|
||||
Reference in New Issue
Block a user