diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-16 08:22:56 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-17 15:20:53 +0200 |
commit | e6d8e5e6e366ab4c9ed7d8ed1572f98c6ad6a38e (patch) | |
tree | b2dccdff722c26cf62fd03ee0323c5eac1461909 /scripts/tracetool/format | |
parent | 86a8989d4557a09b68f8b78b6c3fb6ad3f23ca6f (diff) |
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>
Diffstat (limited to 'scripts/tracetool/format')
-rw-r--r-- | scripts/tracetool/format/log_stap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/tracetool/format/log_stap.py b/scripts/tracetool/format/log_stap.py index 0b6549d534..b49afababd 100644 --- a/scripts/tracetool/format/log_stap.py +++ b/scripts/tracetool/format/log_stap.py @@ -83,7 +83,7 @@ def c_fmt_to_stap(fmt): # and "%ll" is not valid at all. Similarly the size_t # based "%z" size qualifier is not valid. We just # strip all size qualifiers for sanity. - fmt = re.sub("%(\d*)(l+|z)(x|u|d)", "%\\1\\3", "".join(bits)) + fmt = re.sub(r"%(\d*)(l+|z)(x|u|d)", r"%\1\3", "".join(bits)) return fmt def generate(events, backend, group): |