]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/050: Remove unnecessary use of global in teardown()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 2 Jan 2026 06:25:06 +0000 (11:55 +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/050-sudo-systemd_create_scope_w_pid.py

index 46a89c3a8d272c46537a60c7d25cf73d52162595..ce307da8616a98c81b4dc6142e7ff9923393d6b2 100755 (executable)
@@ -68,8 +68,6 @@ def test(config):
 
 
 def teardown(config, result):
-    global pid
-
     Process.kill(config, pid)
 
     if result != consts.TEST_PASSED: