Skip to content

Commit

Permalink
docs/sphinx: avoid invalid escape in Python string
Browse files Browse the repository at this point in the history
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>
(cherry picked from commit e4b6532)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
bonzini authored and Michael Tokarev committed Oct 19, 2023
1 parent adbbddf commit 23b0010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sphinx/hxtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit 23b0010

Please sign in to comment.