summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-08-23 13:06:54 -0400
committerGitHub <noreply@github.com>2017-08-23 13:06:54 -0400
commit1c104f28d44409fe7160a7467c65d1dfca837cc3 (patch)
tree5b1e7f105767aa2c86c7ad69a2c5e346215674a6 /roles/lib_openshift/src
parent2a4f95429df8f6c7c4d3ca35ccca5e27fbf372fc (diff)
parent1daba5e1bc11dde6344def8899926ca03abf6156 (diff)
downloadopenshift-1c104f28d44409fe7160a7467c65d1dfca837cc3.tar.gz
openshift-1c104f28d44409fe7160a7467c65d1dfca837cc3.tar.bz2
openshift-1c104f28d44409fe7160a7467c65d1dfca837cc3.tar.xz
openshift-1c104f28d44409fe7160a7467c65d1dfca837cc3.zip
Merge pull request #5101 from maxamillion/add-dnf-support
Add dnf support
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