Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating parent dirs for output_dir #2543

Merged

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Jun 2, 2023

Currently when setting the openmc.deplete.CoupledOperator().output_dir to a directory with a subfolder the subfolder does not get created and the python script crashes with an error.

For example, this would reproduce the bug

operator = openmc.deplete.CoupledOperator(
    model=model,
    normalization_mode="source-rate"
)
operator.output_dir = 'outputfolder/anotherfolder'  # this path contains a sub folder

This PR attempts to fix the error by adding parents=True to the folder creation command in openmc.deplete.abc.py

@shimwell shimwell requested a review from drewejohnson as a code owner June 2, 2023 12:24
@shimwell shimwell enabled auto-merge (squash) June 2, 2023 15:49
Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough -- thanks @shimwell!

@shimwell shimwell merged commit 74fb280 into openmc-dev:develop Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants