From f8101006d821abc109df45092088d5d8ce9794e2 Mon Sep 17 00:00:00 2001 From: Olek <45364492+yardasol@users.noreply.github.com> Date: Sat, 13 Aug 2022 10:20:19 -0500 Subject: [PATCH] remove `init_lib()` call in `MicroXS.from_model()`; use `setdefault` to ensure correct directory is used Co-authored-by: Paul Romano --- openmc/deplete/microxs.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openmc/deplete/microxs.py b/openmc/deplete/microxs.py index 05831fb1a3..ccbfab5389 100644 --- a/openmc/deplete/microxs.py +++ b/openmc/deplete/microxs.py @@ -94,10 +94,8 @@ class MicroXS(DataFrame): with tempfile.TemporaryDirectory() as temp_dir: if run_kwargs is None: run_kwargs = {} - model.init_lib() - elif 'cwd' in run_kwargs: - run_kwargs.pop('cwd') - statepoint_path = model.run(cwd=temp_dir, **run_kwargs) + run_kwargs.setdefault('cwd', temp_dir) + statepoint_path = model.run(**run_kwargs) with StatePoint(statepoint_path) as sp: for rx in xs: