From: Kamalesh Babulal Date: Thu, 8 Jan 2026 06:35:45 +0000 (+0530) Subject: ftests/077: Remove unnecessary use of global in teardown() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67ebccb3421269d75929da4663f8e14b13697556;p=thirdparty%2Flibcgroup.git ftests/077: Remove unnecessary use of global in teardown() The global statement is only needed when assigning to a global variable, not when only reading its value. In teardown(), the global initial_pid_list declaration is unnecessary since pid is only being read. Remove the global initial_pid_list from teardown(). Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/tests/ftests/077-pybindings-cgroup_get_procs.py b/tests/ftests/077-pybindings-cgroup_get_procs.py index f1557897..09a9ab75 100755 --- a/tests/ftests/077-pybindings-cgroup_get_procs.py +++ b/tests/ftests/077-pybindings-cgroup_get_procs.py @@ -83,8 +83,6 @@ def test(config): def teardown(config): - global initial_pid_list - Process.kill(config, initial_pid_list) CgroupCli.delete(config, CONTROLLERS, EMPTY_CGNAME) CgroupCli.delete(config, CONTROLLERS, os.path.dirname(CGNAME), recursive=True)