diff mbox series

[PULL,10/32] docs/sphinx: avoid invalid escape in Python string

Message ID 20231018082752.322306-11-pbonzini@redhat.com
State New
Headers show
Series [PULL,01/32] iotests: get rid of '..' in path environment output | expand

Commit Message

Paolo Bonzini Oct. 18, 2023, 8:27 a.m. UTC
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>
---
 docs/sphinx/hxtool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/docs/sphinx/hxtool.py b/docs/sphinx/hxtool.py
index fb0649a3d5b..9f6b9d87dcc 100644
--- a/docs/sphinx/hxtool.py
+++ b/docs/sphinx/hxtool.py
@@ -49,7 +49,7 @@  def serror(file, lnum, errtext):
 
 def parse_directive(line):
     """Return first word of line, if any"""
-    return re.split('\W', line)[0]
+    return re.split(r'\W', line)[0]
 
 def parse_defheading(file, lnum, line):
     """Handle a DEFHEADING directive"""