From 45065d711ff2cdad3ef3e46b44e00a83d60eb8e7 Mon Sep 17 00:00:00 2001 From: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:08:38 +0200 Subject: [PATCH] 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> --- tools/macvendor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/macvendor.py b/tools/macvendor.py index eaf46e00..d7ca5f42 100644 --- a/tools/macvendor.py +++ b/tools/macvendor.py @@ -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)