Fix openmc.config when OPENMC_CROSS_SECTIONS is not set

This commit is contained in:
Paul Romano 2022-09-08 09:35:03 -05:00
parent 35930e0422
commit a7abe84b38

View file

@ -65,7 +65,7 @@ def _default_config():
# Set depletion chain
chain_file = os.environ.get("OPENMC_CHAIN_FILE")
if (chain_file is None and
config['cross_sections'] is not None and
config.get('cross_sections') is not None and
config['cross_sections'].exists()
):
# Check for depletion chain in cross_sections.xml