diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-28 13:29:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-29 15:59:29 +0100 |
commit | c80a6a6e663a3fe017a3fdee65c63c99402ebd19 (patch) | |
tree | 19ab27d167907210bd10ab653b85a3350c3194b7 | |
parent | 362c829ba1931f91de4def5169570df525f4317d (diff) | |
download | poky-c80a6a6e663a3fe017a3fdee65c63c99402ebd19.tar.gz |
create-spdx: Avoid regex warning by quoting correctly
create-spdx.bbclass:43: DeprecationWarning: invalid escape sequence \W
lic_regex = re.compile(b'^\W*SPDX-License-Identifier:\s*([ \w\d.()+-]+?)(?:\s+\W*)?$', re.MULTILINE)
(From OE-Core rev: 5dfb26d45f69c4d5dc4b6fcef084b830ef9dbf4c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/create-spdx.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass index cae8cccd8d..137db81a5b 100644 --- a/meta/classes/create-spdx.bbclass +++ b/meta/classes/create-spdx.bbclass | |||
@@ -40,7 +40,7 @@ do_image_complete[depends] = "virtual/kernel:do_create_spdx" | |||
40 | def extract_licenses(filename): | 40 | def extract_licenses(filename): |
41 | import re | 41 | import re |
42 | 42 | ||
43 | lic_regex = re.compile(b'^\W*SPDX-License-Identifier:\s*([ \w\d.()+-]+?)(?:\s+\W*)?$', re.MULTILINE) | 43 | lic_regex = re.compile(rb'^\W*SPDX-License-Identifier:\s*([ \w\d.()+-]+?)(?:\s+\W*)?$', re.MULTILINE) |
44 | 44 | ||
45 | try: | 45 | try: |
46 | with open(filename, 'rb') as f: | 46 | with open(filename, 'rb') as f: |