From ba914ef97e73583554d14c280ae18f11fced66f6 Mon Sep 17 00:00:00 2001 From: "Jose A. Rivera" Date: Fri, 24 Mar 2017 11:00:08 -0500 Subject: oo_collect: Update comments to show source of failure Signed-off-by: Jose A. Rivera --- filter_plugins/oo_filters.py | 6 +++--- 1 file 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]))] -- cgit v1.2.3