mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen/x86: Fix Syntax warning in gen-cpuid.py
Python 3.12.2 warns: xen/tools/gen-cpuid.py:50: SyntaxWarning: invalid escape sequence '\s' "\s+([\s\d]+\*[\s\d]+\+[\s\d]+)\)" xen/tools/gen-cpuid.py:51: SyntaxWarning: invalid escape sequence '\s' "\s+/\*([\w!]*) .*$") Specify the strings as raw strings so '\s' is read as literal '\' + 's'. This avoids escaping all the '\'s in the strings. Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
647f7e50eb
commit
08e79bba73
1 file changed
+2
-2
@@ -47,8 +47,8 @@ def parse_definitions(state):
|
||||
"""
|
||||
feat_regex = re.compile(
|
||||
r"^XEN_CPUFEATURE\(([A-Z0-9_]+),"
|
||||
"\s+([\s\d]+\*[\s\d]+\+[\s\d]+)\)"
|
||||
"\s+/\*([\w!]*) .*$")
|
||||
r"\s+([\s\d]+\*[\s\d]+\+[\s\d]+)\)"
|
||||
r"\s+/\*([\w!]*) .*$")
|
||||
|
||||
word_regex = re.compile(
|
||||
r"^/\* .* word (\d*) \*/$")
|
||||
|
||||