Ver código fonte

Merge pull request #6184 from sdodson/bz1469387

Only remove empty keys from env if env exists
Scott Dodson 7 anos atrás
pai
commit
2a9e225c9f
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      roles/openshift_facts/library/openshift_facts.py

+ 2 - 1
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