From e5966f65d39f376ca92862905450a68bf156a11d Mon Sep 17 00:00:00 2001 From: Bonelli Date: Sat, 14 Mar 2026 08:42:30 -0400 Subject: [PATCH] fix: wipe toml dfn dir before regenerating mf6 module --- flopy/mf6/utils/generate_classes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flopy/mf6/utils/generate_classes.py b/flopy/mf6/utils/generate_classes.py index 6bab04505..7015ea971 100644 --- a/flopy/mf6/utils/generate_classes.py +++ b/flopy/mf6/utils/generate_classes.py @@ -89,7 +89,8 @@ def generate_classes( print() tomlpath = dfnpath / "toml" - tomlpath.mkdir(exist_ok=True) + shutil.rmtree(tomlpath, ignore_errors=True) + tomlpath.mkdir() dfn2toml(dfnpath, tomlpath) shutil.rmtree(_MF6_AUTOGEN_PATH)