mirror of
https://gitlab.com/kernel-firmware/linux-firmware.git
synced 2025-12-10 07:44:48 +01:00
check_whence.py: annotate replacement strings as raw
Otherwise python 3.12 throws warnings like below:
.../check_whence.py:40: SyntaxWarning: invalid escape sequence '\ '
yield match.group(1).replace("\ ", " ").replace('"', "")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
1dbbc8fb82
commit
737e6f37c0
1 changed files with 3 additions and 3 deletions
|
|
@ -37,7 +37,7 @@ def list_whence_files():
|
||||||
for line in whence:
|
for line in whence:
|
||||||
match = re.match(r"(?:RawFile|File):\s*(.*)", line)
|
match = re.match(r"(?:RawFile|File):\s*(.*)", line)
|
||||||
if match:
|
if match:
|
||||||
yield match.group(1).replace("\ ", " ").replace('"', "")
|
yield match.group(1).replace(r"\ ", " ").replace('"', "")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -48,8 +48,8 @@ def list_links_list():
|
||||||
if match:
|
if match:
|
||||||
linkname, target = match.group(1).split("->")
|
linkname, target = match.group(1).split("->")
|
||||||
|
|
||||||
linkname = linkname.strip().replace("\ ", " ").replace('"', "")
|
linkname = linkname.strip().replace(r"\ ", " ").replace('"', "")
|
||||||
target = target.strip().replace("\ ", " ").replace('"', "")
|
target = target.strip().replace(r"\ ", " ").replace('"', "")
|
||||||
|
|
||||||
# Link target is relative to the link
|
# Link target is relative to the link
|
||||||
target = os.path.join(os.path.dirname(linkname), target)
|
target = os.path.join(os.path.dirname(linkname), target)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue