summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2017-03-24 11:00:08 -0500
committerJose A. Rivera <jarrpa@redhat.com>2017-04-03 11:35:06 -0500
commitba914ef97e73583554d14c280ae18f11fced66f6 (patch)
tree19365b0449452984b9ea27b7e920db9dd1e158fe
parent0bac74c346bb5c620bdf1941b40c29ff3083e2b0 (diff)
downloadopenshift-ba914ef97e73583554d14c280ae18f11fced66f6.tar.gz
openshift-ba914ef97e73583554d14c280ae18f11fced66f6.tar.bz2
openshift-ba914ef97e73583554d14c280ae18f11fced66f6.tar.xz
openshift-ba914ef97e73583554d14c280ae18f11fced66f6.zip
oo_collect: Update comments to show source of failure
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
-rw-r--r--filter_plugins/oo_filters.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py
index a619f9ccb..6760f9b2d 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -140,14 +140,14 @@ def oo_collect(data, attribute=None, filters=None):
returns [1, 2, 3]
"""
if not isinstance(data, list):
- raise errors.AnsibleFilterError("|failed expects to filter on a List")
+ raise errors.AnsibleFilterError("oo_collect expects to filter on a List")
if not attribute:
- raise errors.AnsibleFilterError("|failed expects attribute to be set")
+ raise errors.AnsibleFilterError("oo_collect expects attribute to be set")
if filters is not None:
if not isinstance(filters, dict):
- raise errors.AnsibleFilterError("|failed expects filter to be a"
+ raise errors.AnsibleFilterError("oo_collect expects filter to be a"
" dict")
retval = [get_attr(d, attribute) for d in data if (
all([d.get(key, None) == filters[key] for key in filters]))]