Skip to content

Commit 106b47d

Browse files
committed
fix txt file processing on download
1 parent 1c28426 commit 106b47d

File tree

1 file changed

+1
-1
lines changed
  • cosmotech/coal/cosmotech_api/dataset/download

1 file changed

+1
-1
lines changed

cosmotech/coal/cosmotech_api/dataset/download/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def process_txt(target_file) -> Dict[str, Any]:
112112
LOGGER.debug(T("coal.services.dataset.processing_text").format(file_name=target_file))
113113
with open(target_file, "r") as _file:
114114
current_filename = os.path.basename(target_file)
115-
content[current_filename] = "".join(line for line in _file)
115+
content[current_filename] = _file.read()
116116

117117
line_count = content[current_filename].count("\n") + 1
118118
LOGGER.debug(T("coal.services.dataset.text_processed").format(file_name=current_filename, lines=line_count))

0 commit comments

Comments
 (0)