diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-04-04 18:38:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 18:38:49 -0500 |
commit | 6cb58041aa68712744b4d6853ca222a348f61f77 (patch) | |
tree | dd91a80415d89238e939751a781b66bca782e21f /roles/lib_openshift/library | |
parent | 6cf9fa3c97cdfa1e19b5a2d5cee650eb4efb58e6 (diff) | |
parent | c6b86225e3a5773a77a759c94503cbc079ea0f0a (diff) | |
download | openshift-6cb58041aa68712744b4d6853ca222a348f61f77.tar.gz openshift-6cb58041aa68712744b4d6853ca222a348f61f77.tar.bz2 openshift-6cb58041aa68712744b4d6853ca222a348f61f77.tar.xz openshift-6cb58041aa68712744b4d6853ca222a348f61f77.zip |
Merge pull request #3841 from jarrpa/oc_label-get-fix
Merged by openshift-bot
Diffstat (limited to 'roles/lib_openshift/library')
-rw-r--r-- | roles/lib_openshift/library/oc_label.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/lib_openshift/library/oc_label.py b/roles/lib_openshift/library/oc_label.py index 62b6049c4..5fbbabe4f 100644 --- a/roles/lib_openshift/library/oc_label.py +++ b/roles/lib_openshift/library/oc_label.py @@ -1551,9 +1551,9 @@ class OCLabel(OpenShiftCLI): label_list = [] if self.name: - result = self._get(resource=self.kind, rname=self.name, selector=self.selector) + result = self._get(resource=self.kind, rname=self.name) - if 'labels' in result['results'][0]['metadata']: + if result['results'][0] and 'labels' in result['results'][0]['metadata']: label_list.append(result['results'][0]['metadata']['labels']) else: label_list.append({}) |