From 08464f4fe77af941cac582adbb5e1c41363a4be9 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Wed, 23 Aug 2017 14:34:49 -0400 Subject: Fix generated content --- roles/lib_openshift/library/oc_adm_csr.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'roles/lib_openshift/library') diff --git a/roles/lib_openshift/library/oc_adm_csr.py b/roles/lib_openshift/library/oc_adm_csr.py index 96ba9722c..231857cca 100644 --- a/roles/lib_openshift/library/oc_adm_csr.py +++ b/roles/lib_openshift/library/oc_adm_csr.py @@ -1266,13 +1266,12 @@ class Utils(object): # pragma: no cover @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 -- cgit v1.2.3