Skip to content

Commit

Permalink
feat: create directory if it doesn't exist when creating CSV file in …
Browse files Browse the repository at this point in the history
…`DAQJobStoreCSV`
  • Loading branch information
furkan-bilgin committed Nov 5, 2024
1 parent 679a756 commit 1524bdf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/daq/jobs/store/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def _open_csv_file(
file_exists = os.path.exists(file_path)
# Create the file if it doesn't exist
if not file_exists:
# Create the directory if it doesn't exist
Path(os.path.dirname(file_path)).mkdir(parents=True, exist_ok=True)
Path(file_path).touch()

# Open file
Expand Down

0 comments on commit 1524bdf

Please sign in to comment.