summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-11-21 08:39:09 -0500
committerGitHub <noreply@github.com>2017-11-21 08:39:09 -0500
commit2a9e225c9f2f1d1f886c9ff6af0443dcd5fdae17 (patch)
treea580a74b580641513d398574e102b083adf7604b /roles/openshift_facts
parent6313f519307cf50055589c3876d8bec398bbc4d4 (diff)
parentd4819b8946980d42108e563b94cc56ac31969adb (diff)
downloadopenshift-2a9e225c9f2f1d1f886c9ff6af0443dcd5fdae17.tar.gz
openshift-2a9e225c9f2f1d1f886c9ff6af0443dcd5fdae17.tar.bz2
openshift-2a9e225c9f2f1d1f886c9ff6af0443dcd5fdae17.tar.xz
openshift-2a9e225c9f2f1d1f886c9ff6af0443dcd5fdae17.zip
Merge pull request #6184 from sdodson/bz1469387
Only remove empty keys from env if env exists
Diffstat (limited to 'roles/openshift_facts')
-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