Skip to content

Commit 5f6af7c

Browse files
lfoppianoCopilot
andauthored
Update grobid_client/grobid_client.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9a7cc75 commit 5f6af7c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

grobid_client/grobid_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,8 @@ def process_pdf(
584584
return self._handle_request_error(pdf_file, e)
585585
except Exception as e:
586586
return self._handle_unexpected_error(pdf_file, e)
587-
finally:
588-
pdf_handle.close()
587+
if pdf_handle is not None:
588+
pdf_handle.close()
589589

590590
def get_server_url(self, service):
591591
return self.config['grobid_server'] + "/api/" + service

0 commit comments

Comments
 (0)