macvendor.py: use raw strings for regex

This prevents the following warning message:

[...]/tools/macvendor.py:67: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
  cols = re.split("\s\s+|\t", line)

Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
This commit is contained in:
darkexplosiveqwx
2026-06-25 13:08:38 +02:00
parent 647f99e06b
commit 45065d711f
+2 -2
View File
@@ -62,9 +62,9 @@ for line in manuf:
continue
# Remove quotation marks as these might interfere with later INSERT / UPDATE commands
line = re.sub("\'|\"","", line)
line = re.sub(r"\'|\"","", line)
# \s = Unicode whitespace characters, including [ \t\n\r\f\v]
cols = re.split("\s\s+|\t", line)
cols = re.split(r"\s\s+|\t", line)
# Use try/except chain to catch empty/incomplete lines without failing hard
try:
# Strip whitespace and quotation marks (some entries are incomplete and cause errors with the CSV parser otherwise)