]> Gentwo Git Trees - linux/.git/commit
selftests: net: py: coding style improvements
authorJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 02:10:13 +0000 (18:10 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Nov 2025 02:19:28 +0000 (18:19 -0800)
commit5cb7b71b76f1235ee2064c30922864f24e31a076
tree3eeb4373f08f739b59ba1981067efec8475ffa39
parentd99b408ed8e5f7c070274f4d6c73023b2aae22b3
selftests: net: py: coding style improvements

We're about to add more features here and finding new issues with old
ones in place is hard. Address ruff checks:
 - bare exceptions
 - f-string with no params
 - unused import

We need to use BaseException when handling defer(), as Petr points out.
This retains the old behavior of ignoring SIGTERM while running cleanups.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/20251120021024.2944527-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/lib/py/ksft.py