diff options
author | Adam Miller <maxamillion@fedoraproject.org> | 2017-08-18 10:57:24 -0500 |
---|---|---|
committer | Adam Miller <maxamillion@fedoraproject.org> | 2017-08-18 10:57:24 -0500 |
commit | a294ee21e86b16f3ec052305508aee9492713f6d (patch) | |
tree | 7074bc229c0de522a10b25b000418f1ab4bbf425 /roles/openshift_health_checker | |
parent | 2e472930fafd8e377410b500a0339585ab9f1c4e (diff) | |
download | openshift-a294ee21e86b16f3ec052305508aee9492713f6d.tar.gz openshift-a294ee21e86b16f3ec052305508aee9492713f6d.tar.bz2 openshift-a294ee21e86b16f3ec052305508aee9492713f6d.tar.xz openshift-a294ee21e86b16f3ec052305508aee9492713f6d.zip |
raise AosVersionException if no expected packages found by dnf query
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
Diffstat (limited to 'roles/openshift_health_checker')
-rw-r--r-- | roles/openshift_health_checker/library/aos_version.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/openshift_health_checker/library/aos_version.py b/roles/openshift_health_checker/library/aos_version.py index 61ae749fa..0dd6606f8 100644 --- a/roles/openshift_health_checker/library/aos_version.py +++ b/roles/openshift_health_checker/library/aos_version.py @@ -130,6 +130,14 @@ def _retrieve_available_packages(expected_pkgs): pkgs = list(aquery.filter(name=expected_pkgs)) + if not pkgs: + # pkgs list is empty, raise because no expected packages found + raise AosVersionException('\n'.join([ + 'Unable to find any OpenShift packages.', + 'Check your subscription and repo settings.', + str(excinfo), + ])) + return pkgs |