summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-07-19 14:02:20 -0400
committerAndrew Butcher <abutcher@redhat.com>2016-07-19 14:02:20 -0400
commit5efe55d568ebc6fa2c4943779e5f4c0a809e86a5 (patch)
tree8b8123afd5dad1e29e6a57313e7c300ee48a0e5d
parent3b9c6afe1684c0c9be6dd1c3a12c493c85c38751 (diff)
downloadopenshift-5efe55d568ebc6fa2c4943779e5f4c0a809e86a5.tar.gz
openshift-5efe55d568ebc6fa2c4943779e5f4c0a809e86a5.tar.bz2
openshift-5efe55d568ebc6fa2c4943779e5f4c0a809e86a5.tar.xz
openshift-5efe55d568ebc6fa2c4943779e5f4c0a809e86a5.zip
Ensure 'oo_nfs_to_config' in groups prior to checking group length when nfs host unset.
-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 d706d0304..ec00a1646 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -660,7 +660,7 @@ class FilterModule(object):
if kind == 'nfs':
host = params['host']
if host == None:
- if len(groups['oo_nfs_to_config']) > 0:
+ if 'oo_nfs_to_config' in groups and len(groups['oo_nfs_to_config']) > 0:
host = groups['oo_nfs_to_config'][0]
else:
raise errors.AnsibleFilterError("|failed no storage host detected")