diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-08-23 14:34:49 -0400 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2017-08-23 14:34:49 -0400 |
commit | 08464f4fe77af941cac582adbb5e1c41363a4be9 (patch) | |
tree | 96982615b4adb7f6aabd433bc0f9be0132e6d20e /roles/lib_openshift | |
parent | 6968359e77172a8a332d95b5cd146e475d688c7e (diff) | |
download | openshift-08464f4fe77af941cac582adbb5e1c41363a4be9.tar.gz openshift-08464f4fe77af941cac582adbb5e1c41363a4be9.tar.bz2 openshift-08464f4fe77af941cac582adbb5e1c41363a4be9.tar.xz openshift-08464f4fe77af941cac582adbb5e1c41363a4be9.zip |
Fix generated content
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r-- | roles/lib_openshift/library/oc_adm_csr.py | 9 |
1 files changed, 4 insertions, 5 deletions
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 |