summaryrefslogtreecommitdiffstats
path: root/scripts/lib/checklayer/__init__.py
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2024-02-10 14:15:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-13 13:51:41 +0000
commit605ef6f5a292fe169b1469b0a8996f3d5ae53daf (patch)
tree68ea616c466ade988cc324256d012e1ec6501942 /scripts/lib/checklayer/__init__.py
parent97eebe59d7ba9d7eb647a2f2a0353fc2424e9827 (diff)
downloadpoky-605ef6f5a292fe169b1469b0a8996f3d5ae53daf.tar.gz
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 <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/checklayer/__init__.py')
-rw-r--r--scripts/lib/checklayer/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index 8271ed7fe3..62ecdfe390 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -324,8 +324,8 @@ def get_signatures(builddir, failsafe=False, machine=None, extravars=None):
324 else: 324 else:
325 raise 325 raise
326 326
327 sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$") 327 sig_regex = re.compile(r"^(?P<task>.*:.*):(?P<hash>.*) .$")
328 tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*") 328 tune_regex = re.compile(r"(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")
329 current_tune = None 329 current_tune = None
330 with open(sigs_file, 'r') as f: 330 with open(sigs_file, 'r') as f:
331 for line in f.readlines(): 331 for line in f.readlines():