summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-11-11 11:41:17 -0500
committerThomas Wiest <twiest@users.noreply.github.com>2015-11-11 11:41:17 -0500
commit4c6ef6236555af4f6c8d6b49a64f6134f11af73e (patch)
tree8a806017ca575603529d56dacb58142af908740a
parentd609529c873fbfded9c58727f39eb8c610ffe31e (diff)
parentd312f8115d6a46b65e413a4db07cba2bae565cfb (diff)
downloadopenshift-4c6ef6236555af4f6c8d6b49a64f6134f11af73e.tar.gz
openshift-4c6ef6236555af4f6c8d6b49a64f6134f11af73e.tar.bz2
openshift-4c6ef6236555af4f6c8d6b49a64f6134f11af73e.tar.xz
openshift-4c6ef6236555af4f6c8d6b49a64f6134f11af73e.zip
Merge pull request #868 from ibotty/oo-filter-dont-fail
oo_filter: don't fail when attribute is not defined
-rw-r--r--filter_plugins/oo_filters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py
index f4643270d..9a17913c4 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -275,7 +275,7 @@ class FilterModule(object):
raise errors.AnsibleFilterError("|failed expects filter_attr is a str")
# Gather up the values for the list of keys passed in
- return [x for x in data if x[filter_attr]]
+ return [x for x in data if x.has_key(filter_attr) and x[filter_attr]]
@staticmethod
def oo_parse_heat_stack_outputs(data):