diff --git a/lib/report.py b/lib/report.py index ba8f1d3..48d010f 100644 --- a/lib/report.py +++ b/lib/report.py @@ -1,4 +1,5 @@ # save as data/report.csv +import os import csv from typing import List, Dict, Any @@ -6,6 +7,8 @@ from typing import List, Dict, Any # file path는 'data/report.csv'로 고정 def save_report(report_data: List[Dict[str, Any]], file_path: str = 'data/report.csv') -> None: + os.makedirs(os.path.dirname(file_path), exist_ok=True) + """ Save the report data to a CSV file.