Skip to content

Commit

Permalink
Clean out previously generated settings modules
Browse files Browse the repository at this point in the history
  • Loading branch information
dnwillia-work committed Jul 4, 2022
1 parent d9e07fa commit ce703e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions codegen/settingsgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import os
import pickle
import pprint
import shutil

from ansys.fluent.core.solver import flobject

Expand Down Expand Up @@ -306,8 +307,11 @@ def generate():
"settings",
)
)
if not os.path.exists(parent_dir):
os.makedirs(parent_dir)

# Clear previously generated data
if os.path.exists(parent_dir):
shutil.rmtree(parent_dir)
os.makedirs(parent_dir)

session = launch_fluent()
sinfo = session._settings_service.get_static_info()
Expand Down

0 comments on commit ce703e6

Please sign in to comment.