diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-09-22 00:12:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-22 00:12:48 -0700 |
commit | 2d0501b63ff07b177b3fb5b1c6663ed369656240 (patch) | |
tree | 8b20ce9533782f0c3137ff46c56c34c7417ab71d /roles/lib_utils | |
parent | 8c4380f5f6613abcc4c9b7916914ad88bde9c1d1 (diff) | |
parent | 7a59228342378bdfe5c9a6404a262569212d6279 (diff) | |
download | openshift-2d0501b63ff07b177b3fb5b1c6663ed369656240.tar.gz openshift-2d0501b63ff07b177b3fb5b1c6663ed369656240.tar.bz2 openshift-2d0501b63ff07b177b3fb5b1c6663ed369656240.tar.xz openshift-2d0501b63ff07b177b3fb5b1c6663ed369656240.zip |
Merge pull request #5476 from kwoodson/yedit_list_fix
Automatic merge from submit-queue
Returning actual results of yedit query. Empty list was returning empty dict.
This is a simple change but since code generation happens it affects lots of files.
The only change that is happening here is the following:
```
- rval = yamlfile.get(params['key']) or {} 
+ rval = yamlfile.get(params['key'])
```
When something returned as 0, [], or None the query would return {}. This was unintended.
Diffstat (limited to 'roles/lib_utils')
-rw-r--r-- | roles/lib_utils/library/yedit.py | 2 | ||||
-rw-r--r-- | roles/lib_utils/src/class/yedit.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/lib_utils/library/yedit.py b/roles/lib_utils/library/yedit.py index 921bca074..cf5c2e423 100644 --- a/roles/lib_utils/library/yedit.py +++ b/roles/lib_utils/library/yedit.py @@ -793,7 +793,7 @@ class Yedit(object): yamlfile.yaml_dict = content if params['key']: - rval = yamlfile.get(params['key']) or {} + rval = yamlfile.get(params['key']) return {'changed': False, 'result': rval, 'state': state} diff --git a/roles/lib_utils/src/class/yedit.py b/roles/lib_utils/src/class/yedit.py index 957c35a06..0a4fbe07a 100644 --- a/roles/lib_utils/src/class/yedit.py +++ b/roles/lib_utils/src/class/yedit.py @@ -590,7 +590,7 @@ class Yedit(object): yamlfile.yaml_dict = content if params['key']: - rval = yamlfile.get(params['key']) or {} + rval = yamlfile.get(params['key']) return {'changed': False, 'result': rval, 'state': state} |