Skip to content

Commit 066270c

Browse files
authored
fix: wipe toml dfn dir before regenerating mf6 module (#2730)
Delete all the TOMLs before recreating them from DFNs otherwise unwanted TOML components can remain
1 parent 140e952 commit 066270c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

flopy/mf6/utils/generate_classes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def generate_classes(
8989
print()
9090

9191
tomlpath = dfnpath / "toml"
92-
tomlpath.mkdir(exist_ok=True)
92+
shutil.rmtree(tomlpath, ignore_errors=True)
93+
tomlpath.mkdir()
9394
dfn2toml(dfnpath, tomlpath)
9495

9596
shutil.rmtree(_MF6_AUTOGEN_PATH)

0 commit comments

Comments
 (0)