Skip to content

Commit

Permalink
fix liniting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Coleman committed Jun 20, 2024
1 parent 3906769 commit 90ff917
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mirrulations-extractor/src/mirrextractor/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ def update_stats():
.make_attachment_save_path(complete_path)
if not os.path.isfile(output_path):
# Write an empty file. The extract_text method sometimes
# fails with an out-of-memory error if the file is too large,
# and a restart would try again. This ensures that the
# extraction is not attempted again when the extractor
# process is restarted (by Docker).
with open(output_path, 'w') as f: pass
# fails with an out-of-memory error if the file is too
# large, and a restart would try again. This ensures
# that the extraction is not attempted again when the
# extractor process is restarted (by Docker).
with open(output_path, 'w') as f:
pass
start_time = time.time()
Extractor.extract_text(complete_path, output_path)
print(f"Time taken to extract text from {complete_path}"
Expand Down

0 comments on commit 90ff917

Please sign in to comment.