Skip to content

Commit c11d3ef

Browse files
committed
Check file exists before fixing Cantera file
1 parent d55277c commit c11d3ef

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

t3/utils/fix_cantera.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def fix_cantera(model_path: str):
4444
Returns:
4545
bool: Whether the model was fixed.
4646
"""
47+
if not os.path.isfile(model_path):
48+
return False
4749
shutil.copyfile(model_path, model_path + '.bak')
4850
done, fixed = False, False
4951
counter = 0

0 commit comments

Comments
 (0)