summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAdam Miller <maxamillion@fedoraproject.org>2017-08-18 10:57:24 -0500
committerAdam Miller <maxamillion@fedoraproject.org>2017-08-18 10:57:24 -0500
commita294ee21e86b16f3ec052305508aee9492713f6d (patch)
tree7074bc229c0de522a10b25b000418f1ab4bbf425 /roles
parent2e472930fafd8e377410b500a0339585ab9f1c4e (diff)
downloadopenshift-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')
-rw-r--r--roles/openshift_health_checker/library/aos_version.py8
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