\{ is an illegal escape sequence, to get a literal backslash we need to use \\.
This is being fixed because of an issue spotted when attempting to use the pyupgrade script. Signed-off-by: John Snow <js...@redhat.com> --- scripts/feature_to_c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/feature_to_c.py b/scripts/feature_to_c.py index 807af0e685c..5f8fa8ad5c6 100644 --- a/scripts/feature_to_c.py +++ b/scripts/feature_to_c.py @@ -25,7 +25,7 @@ def writeliteral(indent, bytes): elif c >= 32 and c < 127: sys.stdout.write(c.to_bytes(1, 'big').decode()) else: - sys.stdout.write(f'\{c:03o}') + sys.stdout.write(f'\\{c:03o}') if quoted: sys.stdout.write('"') -- 2.48.1