diff options
author | 2019-07-15 13:57:52 +0200 | |
---|---|---|
committer | 2019-07-15 13:57:52 +0200 | |
commit | 6eb3ee215135ff6e72381dd10986719bd22365d6 (patch) | |
tree | 8ce5aa958835b6495853bb4e9b53a0ed8b6d3d87 /eclass-eapi-matrix.py | |
parent | find-binary-files.sh: Avoid false positives for image/svg. (diff) | |
download | qa-scripts-6eb3ee215135ff6e72381dd10986719bd22365d6.tar.gz qa-scripts-6eb3ee215135ff6e72381dd10986719bd22365d6.tar.bz2 qa-scripts-6eb3ee215135ff6e72381dd10986719bd22365d6.zip |
eclass-eapi-matrix: Avoid crash when @SUPPORTED_EAPIS is false
Avoid crashing on assert when @SUPPORTED_EAPIS indicates that an EAPI
is not supported yet ebuilds actually use it. Instead, report this
as '?!'
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass-eapi-matrix.py')
-rwxr-xr-x | eclass-eapi-matrix.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eclass-eapi-matrix.py b/eclass-eapi-matrix.py index 8117d63..452660f 100755 --- a/eclass-eapi-matrix.py +++ b/eclass-eapi-matrix.py @@ -83,8 +83,10 @@ def format_table(data): supp_eapis, eapis = ecl_data for eapi in all_eapis: if supp_eapis is not None and eapi not in supp_eapis: - assert eapis.get(eapi, 0) == 0 - line['eapi_'+eapi] = 'xx' + if eapis.get(eapi, 0) > 0: + line['eapi_'+eapi] = eapis[eapi] + '?!' + else: + line['eapi_'+eapi] = 'xx' else: line['eapi_'+eapi] = eapis.get(eapi, 0) ret += format_str.format(**line) |