mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
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>
This commit is contained in:
@@ -40,7 +40,7 @@ do_image_complete[depends] = "virtual/kernel:do_create_spdx"
|
|||||||
def extract_licenses(filename):
|
def extract_licenses(filename):
|
||||||
import re
|
import re
|
||||||
|
|
||||||
lic_regex = re.compile(b'^\W*SPDX-License-Identifier:\s*([ \w\d.()+-]+?)(?:\s+\W*)?$', re.MULTILINE)
|
lic_regex = re.compile(rb'^\W*SPDX-License-Identifier:\s*([ \w\d.()+-]+?)(?:\s+\W*)?$', re.MULTILINE)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(filename, 'rb') as f:
|
with open(filename, 'rb') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user