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 <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
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)