From ecdf556b4c00325bb299e012024f97e8af33c788 Mon Sep 17 00:00:00 2001 From: Matt Turner <mattst88@gentoo.org> Date: Fri, 10 Apr 2020 09:51:36 -0700 Subject: catalyst: Fix most pylint warnings - consider-iterating-dictionary - consider-using-enumerate - inconsistent-return-statements - len-as-condition - literal-comparison - no-else-raise - no-else-return - useless-return Unfortunately there are more and they're a bit trickier. Signed-off-by: Matt Turner <mattst88@gentoo.org> --- targets/stage1/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'targets/stage1') diff --git a/targets/stage1/build.py b/targets/stage1/build.py index 069d8d32..b95b4182 100755 --- a/targets/stage1/build.py +++ b/targets/stage1/build.py @@ -22,10 +22,10 @@ buildpkgs = scan_profile("packages.build") # we replace the buildpkg item with the one in the # system profile (it may have <,>,=,etc... operators # and version numbers) -for idx in range(0, len(pkgs)): +for pkg in pkgs: try: - bidx = buildpkgs.index(portage.dep_getkey(pkgs[idx])) - buildpkgs[bidx] = pkgs[idx] + bidx = buildpkgs.index(portage.dep_getkey(pkg)) + buildpkgs[bidx] = pkg if buildpkgs[bidx][0:1] == "*": buildpkgs[bidx] = buildpkgs[bidx][1:] except Exception: -- cgit v1.2.3-65-gdbad