]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/058: Remove unnecessary use of global in teardown()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sat, 3 Jan 2026 06:28:54 +0000 (11:58 +0530)
committerKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 10 Mar 2026 16:38:03 +0000 (22:08 +0530)
The global statement is only needed when assigning to a global variable,
not when only reading its value. In teardown(), the global pid
declaration is unnecessary since pid is only being read. Remove the
global pid from teardown().

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

index 56c1f55eeebf290b60e28fd9c98dcfee12ba40a3..a64eec6b733372f5f248c40865c489649b949c6f 100755 (executable)
@@ -124,8 +124,6 @@ def test(config):
 
 
 def teardown(config, result):
-    global pid
-
     Process.kill(config, pid)
 
     if result != consts.TEST_PASSED: