summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-11-20 11:32:03 -0500
committerScott Dodson <sdodson@redhat.com>2017-11-20 11:35:53 -0500
commitd4819b8946980d42108e563b94cc56ac31969adb (patch)
treee78e8836f4f9ccb6dd115b88334c442302b2aa1f /roles
parent286f136671c1ce7c9db9d39ba4e699fcd2c5d03f (diff)
downloadopenshift-d4819b8946980d42108e563b94cc56ac31969adb.tar.gz
openshift-d4819b8946980d42108e563b94cc56ac31969adb.tar.bz2
openshift-d4819b8946980d42108e563b94cc56ac31969adb.tar.xz
openshift-d4819b8946980d42108e563b94cc56ac31969adb.zip
Only remove empty keys from env if env exists
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 99ebb7e36..8d0cd55ea 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1563,7 +1563,8 @@ def set_builddefaults_facts(facts):
# Scaffold out the full expected datastructure
facts['master']['admission_plugin_config'] = {'BuildDefaults': {'configuration': {'env': {}}}}
facts['master']['admission_plugin_config'].update(builddefaults['config'])
- delete_empty_keys(facts['master']['admission_plugin_config']['BuildDefaults']['configuration']['env'])
+ if 'env' in facts['master']['admission_plugin_config']['BuildDefaults']['configuration']:
+ delete_empty_keys(facts['master']['admission_plugin_config']['BuildDefaults']['configuration']['env'])
return facts