genisolist: use raw string in regex

Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
Shengqi Chen 2024-05-03 14:03:35 +08:00
parent 9c242560da
commit 6e03bff2a0
No known key found for this signature in database
GPG Key ID: 6EE389C0F18AF774

View File

@ -184,7 +184,7 @@ def parseSection(items, rsync=False):
# find last non-wildcard path
non_regex = []
for dir in location.split("/"):
if re.search("[\?\*\[\]]", dir):
if re.search(r"[\?\*\[\]]", dir):
break
non_regex.append(dir)
prefix = "/".join(non_regex + [""])
@ -286,7 +286,7 @@ def getImageList():
prior = {}
for (name, value) in ini.items("%main%"):
if re.match("d\d+$", name):
if re.match(r"d\d+$", name):
prior[value] = int(name[1:])
url_dict = {}