mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 14:02:05 -06:00
tracetool: avoid invalid escape in Python string
This is an error in Python 3.12; fix it by using a raw string literal. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
86a8989d45
commit
e6d8e5e6e3
2 changed files with 8 additions and 8 deletions
|
@ -210,12 +210,12 @@ class Event(object):
|
|||
|
||||
"""
|
||||
|
||||
_CRE = re.compile("((?P<props>[\w\s]+)\s+)?"
|
||||
"(?P<name>\w+)"
|
||||
"\((?P<args>[^)]*)\)"
|
||||
"\s*"
|
||||
"(?:(?:(?P<fmt_trans>\".+),)?\s*(?P<fmt>\".+))?"
|
||||
"\s*")
|
||||
_CRE = re.compile(r"((?P<props>[\w\s]+)\s+)?"
|
||||
r"(?P<name>\w+)"
|
||||
r"\((?P<args>[^)]*)\)"
|
||||
r"\s*"
|
||||
r"(?:(?:(?P<fmt_trans>\".+),)?\s*(?P<fmt>\".+))?"
|
||||
r"\s*")
|
||||
|
||||
_VALID_PROPS = set(["disable", "vcpu"])
|
||||
|
||||
|
@ -326,7 +326,7 @@ class Event(object):
|
|||
fmt)
|
||||
# Star matching on PRI is dangerous as one might have multiple
|
||||
# arguments with that format, hence the non-greedy version of it.
|
||||
_FMT = re.compile("(%[\d\.]*\w+|%.*?PRI\S+)")
|
||||
_FMT = re.compile(r"(%[\d\.]*\w+|%.*?PRI\S+)")
|
||||
|
||||
def formats(self):
|
||||
"""List conversion specifiers in the argument print format string."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue