From d4819b8946980d42108e563b94cc56ac31969adb Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Mon, 20 Nov 2017 11:32:03 -0500 Subject: Only remove empty keys from env if env exists --- roles/openshift_facts/library/openshift_facts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'roles/openshift_facts') 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 -- cgit v1.2.3