Skip to content

Commit

Permalink
Ensure that the directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
doruirimescu committed Jul 24, 2024
1 parent 325a7fa commit 9c5d392
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stateful_data_processor/file_rw.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class FileRW:
def __init__(self, file_name: str, logger: Optional[Logger]=None) -> None:
self.file_name = file_name
os.makedirs(os.path.dirname(file_name), exist_ok=True)
if logger is None:
self.logger = getLogger("FileRW")
else:
Expand Down

0 comments on commit 9c5d392

Please sign in to comment.