Skip to content

Commit

Permalink
last chance
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Jul 19, 2024
1 parent 433cbdc commit 21021b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion antarest/study/storage/study_download_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def write_inside_archive(path: Path, file_type: ExportFormat, matrix: MatrixAggr

f.writestr(f"{ts_data.name}.csv", bytes_to_writes)
else:
f= tarfile.open(path, mode="w:gz")
f = tarfile.open(path)
for ts_data in matrix.data:
bytes_to_writes = StudyDownloader.create_csv_file(ts_data, matrix)
file_count += 1
Expand All @@ -378,6 +378,7 @@ def write_inside_archive(path: Path, file_type: ExportFormat, matrix: MatrixAggr
info = tarfile.TarInfo(name=f"{ts_data.name}.csv")
info.size = file_size
f.addfile(tarinfo=info, fileobj=data_file)
f.close()

@staticmethod
def create_csv_file(ts_data: TimeSeriesData, matrix: MatrixAggregationResultDTO) -> bytes:
Expand Down

0 comments on commit 21021b4

Please sign in to comment.