Skip to content

Commit

Permalink
avoid saving results when the status code is not 200
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Sep 13, 2022
1 parent 73abc6c commit 2869511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grobid_client/grobid_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ def process_batch(
input_file, status, text = r.result()
filename = self._output_file_name(input_file, input_path, output)

if text is None:
print("Processing of", input_file, "failed with error", str(status))
if status != 200 or text is None:
print("Processing of", input_file, "failed with error", str(status), ",", text)
else:
# writing TEI file
try:
Expand Down

0 comments on commit 2869511

Please sign in to comment.