diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-02-10 11:18:14 +0100 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2025-02-10 11:19:57 -0700 |
commit | 6649b4217089c5d17dc210946baf9c9537c7fb5d (patch) | |
tree | 2eed1526471a4491f6a8edde27c5c25dabcb6908 /scripts/get_abi.py | |
parent | dc525a7650d70668c4d54cf03b4cba793b72cb5a (diff) | |
download | linux-stable-6649b4217089c5d17dc210946baf9c9537c7fb5d.tar.gz linux-stable-6649b4217089c5d17dc210946baf9c9537c7fb5d.tar.bz2 linux-stable-6649b4217089c5d17dc210946baf9c9537c7fb5d.zip |
scripts/lib/abi/abi_parser.py: make it backward-compatible with Python 3.6
Despite being introduced on Python 3.6, the original implementation
was too limited: it doesn't accept anything but the argument.
Even on python 3.10.12, support was still limited, as more complex
operations cause SyntaxError:
Exception occurred:
File ".../linux/Documentation/sphinx/kernel_abi.py", line 48, in <module>
from get_abi import AbiParser
File ".../linux/scripts/lib/abi/abi_parser.py", line 525
msg += f"{part}\n{"-" * len(part)}\n\n"
^
SyntaxError: f-string: expecting '}'
Replace f-strings by normal string concatenation when it doesn't
work on Python 3.6.
Reported-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/41d2f85df134a46db46fed73a0f9697a3d2ae9ba.1739182025.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/get_abi.py')
0 files changed, 0 insertions, 0 deletions