]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/065: Remove unnecessary use of global in teardown()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sun, 4 Jan 2026 06:29:27 +0000 (11:59 +0530)
committerKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 10 Mar 2026 16:38:03 +0000 (22:08 +0530)
The global statement is only required when assigning to a global
variable, not when simply reading its value. In teardown(), the global
SYSTEMD_PIDS and global OTHER_PIDS declarations are unnecessary because
these variables are only read. Remove both declarations from teardown().

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/065-sudo-systemd_cgclassify-v1.py

index a284ae0b8ebce221f8efc82a1323b347326d9dcf..09a6b8fcf628b51e0f2fc9b9e1fed19872e83c5f 100755 (executable)
@@ -154,8 +154,6 @@ def test(config):
 
 
 def teardown(config):
-    global SYSTEMD_PIDS, OTHER_PIDS
-
     Process.kill(config, SYSTEMD_PIDS)
     Process.kill(config, OTHER_PIDS)