From: Mingli Yu Date: Mon, 11 Oct 2021 08:28:48 +0000 (+0800) Subject: packagedata.py: silence a DeprecationWarning X-Git-Tag: uninative-3.5~1296 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=b5b70cba70067466da5e94f69632a2a029203838;p=openembedded-core.git 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 Signed-off-by: Mingli Yu Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py index 02c81e5a52..212f048bc6 100644 --- a/meta/lib/oe/packagedata.py +++ b/meta/lib/oe/packagedata.py @@ -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: