diff options
author | Matt Turner <mattst88@gentoo.org> | 2020-04-10 09:51:36 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2020-04-10 14:03:34 -0700 |
commit | ecdf556b4c00325bb299e012024f97e8af33c788 (patch) | |
tree | 89eeb61dd64d62a8284ee8e9dc592f58da7c82a5 /targets/stage1 | |
parent | catalyst: Drop ancient portage support (diff) | |
download | catalyst-ecdf556b4c00325bb299e012024f97e8af33c788.tar.gz catalyst-ecdf556b4c00325bb299e012024f97e8af33c788.tar.bz2 catalyst-ecdf556b4c00325bb299e012024f97e8af33c788.zip |
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>
Diffstat (limited to 'targets/stage1')
-rwxr-xr-x | targets/stage1/build.py | 6 |
1 files changed, 3 insertions, 3 deletions
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: |