Przeglądaj źródła

oo_collect: Update comments to show source of failure

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Jose A. Rivera 8 lat temu
rodzic
commit
ba914ef97e
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      filter_plugins/oo_filters.py

+ 3 - 3
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]))]