diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-08 19:30:48 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-08 19:30:48 +0300 |
commit | 4a7a02f60c9f87ad85670e0e798c5aadb8096c92 (patch) | |
tree | 4a1c5a3bf09d213d9a0a599dccd36f2f45eda261 | |
parent | modify test to check that timeout=0 is never passed to _ftp_check (diff) | |
download | pkgcheck-4a7a02f60c9f87ad85670e0e798c5aadb8096c92.tar.gz pkgcheck-4a7a02f60c9f87ad85670e0e798c5aadb8096c92.tar.bz2 pkgcheck-4a7a02f60c9f87ad85670e0e798c5aadb8096c92.zip |
NewerEAPIAvailable: handle better when no eclasses EAPI
It might sometimes not find any intersection of eclasses EAPIs, in which
it is better to not report anything then to report a false positive or
worse, to explode with exception.
Resolves: https://github.com/pkgcore/pkgcheck/issues/679
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | src/pkgcheck/checks/git.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkgcheck/checks/git.py b/src/pkgcheck/checks/git.py index a2619491..b6777161 100644 --- a/src/pkgcheck/checks/git.py +++ b/src/pkgcheck/checks/git.py @@ -388,7 +388,7 @@ class GitPkgCommitsCheck(GentooRepoCheck, GitCommitsCheck): for eclass in new_pkg.inherit ) current_eapi = int(str(new_pkg.eapi)) - common_max_eapi = max(frozenset.intersection(*eclass_eapis)) + common_max_eapi = max(frozenset.intersection(*eclass_eapis), 0) if common_max_eapi > current_eapi: yield NewerEAPIAvailable(common_max_eapi, pkg=new_pkg) |