Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Fix: Create file/path if not existing
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-iteng committed Sep 12, 2024
1 parent 4991667 commit 1fd3bef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/faebryk/exporters/parameters/parameters_to_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def export_parameters_to_file(module: Module, path: Path):
]

logger.info(f"Writing parameters to {path}")
if not path.exists() or not path.is_file():
path.touch()

if path.suffix == ".txt":
with open(path, "w") as f:
for module_name, paras in sorted(parameters.items()):
Expand Down

0 comments on commit 1fd3bef

Please sign in to comment.