summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Florek <tob@butter.sh>2015-11-11 09:19:42 +0100
committerTobias Florek <tob@butter.sh>2015-11-11 09:38:37 +0100
commitd312f8115d6a46b65e413a4db07cba2bae565cfb (patch)
tree625290c65480b67b57b2ec6aab64994b763e4fa6
parent586972b427061433ba6a1cde94228c257d84164e (diff)
downloadopenshift-d312f8115d6a46b65e413a4db07cba2bae565cfb.tar.gz
openshift-d312f8115d6a46b65e413a4db07cba2bae565cfb.tar.bz2
openshift-d312f8115d6a46b65e413a4db07cba2bae565cfb.tar.xz
openshift-d312f8115d6a46b65e413a4db07cba2bae565cfb.zip
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):