mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
packagedata.py: silence a DeprecationWarning
Use regex strings (r’’) to silence below deprecation warning [1]:
$ cat tmp/work/intel_x86_64-wrs-linux/linux-yocto/5.10.x+gitAUTOINC+917c420111_373c02c3ca-r0/temp/log.do_deploy
[snip]
/build/layers/oe-core/meta/lib/oe/packagedata.py:22: DeprecationWarning: invalid escape sequence \s
r = re.compile("(^.+?):\s+(.*)")
[snip]
[1] https://docs.python.org/3/library/re.html
(From OE-Core rev: 82f62387210757f66404f5d9c3f47461664124f5)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
607bd6410f
commit
4cfb6247a2
|
|
@ -19,7 +19,7 @@ def read_pkgdatafile(fn):
|
|||
import re
|
||||
with open(fn, 'r') as f:
|
||||
lines = f.readlines()
|
||||
r = re.compile("(^.+?):\s+(.*)")
|
||||
r = re.compile(r"(^.+?):\s+(.*)")
|
||||
for l in lines:
|
||||
m = r.match(l)
|
||||
if m:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user