Skip to content

Commit

Permalink
packagedata.py: silence a DeprecationWarning
Browse files Browse the repository at this point in the history
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

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
Mingli Yu authored and rpurdie committed Oct 13, 2021
1 parent 87fd308 commit b5b70cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meta/lib/oe/packagedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def decode(str):
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:
Expand Down

0 comments on commit b5b70cb

Please sign in to comment.