summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src
diff options
context:
space:
mode:
authorAdam Miller <maxamillion@fedoraproject.org>2017-08-15 23:51:55 -0500
committerAdam Miller <maxamillion@fedoraproject.org>2017-08-16 15:45:10 -0500
commit2e472930fafd8e377410b500a0339585ab9f1c4e (patch)
tree21cef0c46f3509244c96e00a38335e6e6d4d7f10 /roles/lib_openshift/src
parentb2b9e5e3e92da59d1066890724ab3fc7c8a97bff (diff)
downloadopenshift-2e472930fafd8e377410b500a0339585ab9f1c4e.tar.gz
openshift-2e472930fafd8e377410b500a0339585ab9f1c4e.tar.bz2
openshift-2e472930fafd8e377410b500a0339585ab9f1c4e.tar.xz
openshift-2e472930fafd8e377410b500a0339585ab9f1c4e.zip
add dnf support to roles/openshift_health_checker/library/aos_version.py
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
Diffstat (limited to 'roles/lib_openshift/src')
-rw-r--r--roles/lib_openshift/src/lib/base.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/roles/lib_openshift/src/lib/base.py b/roles/lib_openshift/src/lib/base.py
index 16770b22d..5a307cdb3 100644
--- a/roles/lib_openshift/src/lib/base.py
+++ b/roles/lib_openshift/src/lib/base.py
@@ -464,13 +464,12 @@ class Utils(object):
@staticmethod
def openshift_installed():
''' check if openshift is installed '''
- import yum
+ import rpm
- yum_base = yum.YumBase()
- if yum_base.rpmdb.searchNevra(name='atomic-openshift'):
- return True
+ transaction_set = rpm.TransactionSet()
+ rpmquery = transaction_set.dbMatch("name", "atomic-openshift")
- return False
+ return rpmquery.count() > 0
# Disabling too-many-branches. This is a yaml dictionary comparison function
# pylint: disable=too-many-branches,too-many-return-statements,too-many-statements