Skip to content

Commit

Permalink
check if specified grid file exists, fall back to default if not
Browse files Browse the repository at this point in the history
  • Loading branch information
mogres committed Oct 18, 2023
1 parent 9667485 commit 2d00f18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cellpack/autopack/Environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def __init__(self, config=None, recipe=None):
f"{self.out_folder}/{self.name}_{config['name']}_{self.version}_grid.dat"
)
if recipe.get("grid_file_path") is not None:
self.grid_file_out = recipe["grid_file_path"]
if os.path.isfile(recipe["grid_file_path"]):
self.grid_file_out = recipe["grid_file_path"]

should_load_grid_file = (
os.path.isfile(self.grid_file_out) and self.load_from_grid_file
Expand Down

0 comments on commit 2d00f18

Please sign in to comment.