]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
cgroup.py: fix nested loop variable in get_cgroup_mounts()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 23 Feb 2022 06:16:03 +0000 (11:46 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 24 Feb 2022 15:08:53 +0000 (08:08 -0700)
commit2baa2cbff0dc94acd09abb0af49d9ace1d802701
tree2c6effa7801ad2b43c4d61c7d687c6c53fa95410
parent655271e7c8a83c4e3d0f22b87a54e1b0b394c770
cgroup.py: fix nested loop variable in get_cgroup_mounts()

In get_cgroup_mounts(), both files '/proc/mounts' and
'<mountpoint>/cgroup.controller' uses 'line' as loop variable
to read lines from the file.  The issue here is that, they are
nested. This patch renames second loop variable
'line' -> 'ctrlf_line'.

Reported-by: LGTM
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/cgroup.py