diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-05-10 14:19:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-10 14:19:04 -0500 |
commit | 3a8f805e134848c4dbf24315f3f0b5b48c00721e (patch) | |
tree | 3b07a749a17f3e2c0d27b203a4039db1f84dd9d5 /roles/lib_openshift | |
parent | e8feac55dc8d7a16df224550a8870fc8841f8054 (diff) | |
parent | 9bee74c5c8faa140265024628dd77fbf465d07fa (diff) | |
download | openshift-3a8f805e134848c4dbf24315f3f0b5b48c00721e.tar.gz openshift-3a8f805e134848c4dbf24315f3f0b5b48c00721e.tar.bz2 openshift-3a8f805e134848c4dbf24315f3f0b5b48c00721e.tar.xz openshift-3a8f805e134848c4dbf24315f3f0b5b48c00721e.zip |
Merge pull request #4109 from ewolinetz/fix_ocobj_absent
Merged by openshift-bot
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r-- | roles/lib_openshift/library/oc_obj.py | 2 | ||||
-rw-r--r-- | roles/lib_openshift/src/class/oc_obj.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/lib_openshift/library/oc_obj.py b/roles/lib_openshift/library/oc_obj.py index e12137b51..bdce28045 100644 --- a/roles/lib_openshift/library/oc_obj.py +++ b/roles/lib_openshift/library/oc_obj.py @@ -1548,7 +1548,7 @@ class OCObject(OpenShiftCLI): if state == 'absent': # verify its not in our results if (params['name'] is not None or params['selector'] is not None) and \ - (len(api_rval['results']) == 0 or len(api_rval['results'][0].getattr('items', [])) == 0): + (len(api_rval['results']) == 0 or len(api_rval['results'][0].get('items', [])) == 0): return {'changed': False, 'state': state} if check_mode: diff --git a/roles/lib_openshift/src/class/oc_obj.py b/roles/lib_openshift/src/class/oc_obj.py index 89ee2f5a0..6f0da3d5c 100644 --- a/roles/lib_openshift/src/class/oc_obj.py +++ b/roles/lib_openshift/src/class/oc_obj.py @@ -117,7 +117,7 @@ class OCObject(OpenShiftCLI): if state == 'absent': # verify its not in our results if (params['name'] is not None or params['selector'] is not None) and \ - (len(api_rval['results']) == 0 or len(api_rval['results'][0].getattr('items', [])) == 0): + (len(api_rval['results']) == 0 or len(api_rval['results'][0].get('items', [])) == 0): return {'changed': False, 'state': state} if check_mode: |