diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-08-23 14:48:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-23 14:48:36 -0400 |
commit | b8e45471aa70881ff608962f0fec236c31c2398d (patch) | |
tree | 96982615b4adb7f6aabd433bc0f9be0132e6d20e /roles | |
parent | 6968359e77172a8a332d95b5cd146e475d688c7e (diff) | |
parent | 08464f4fe77af941cac582adbb5e1c41363a4be9 (diff) | |
download | openshift-b8e45471aa70881ff608962f0fec236c31c2398d.tar.gz openshift-b8e45471aa70881ff608962f0fec236c31c2398d.tar.bz2 openshift-b8e45471aa70881ff608962f0fec236c31c2398d.tar.xz openshift-b8e45471aa70881ff608962f0fec236c31c2398d.zip |
Merge pull request #5183 from sdodson/master
Fix generated content
Diffstat (limited to 'roles')
-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 |