Skip to content

Commit

Permalink
src/utils.py: get_textpage_ocr(): don't show debug info after expecte…
Browse files Browse the repository at this point in the history
…d exception.
  • Loading branch information
julian-smith-artifex-com committed Dec 3, 2024
1 parent d587f8f commit 210e553
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,10 @@ def full_ocr(page, dpi, language, flags):
imgpage.extend_textpage(tpage, flags=0, matrix=mat)
imgdoc.close()
except exception_types:
if g_exceptions_verbose: pymupdf.exception_info()
if 0 and g_exceptions_verbose:
# Don't show exception info here because it can happen in
# normal operation (see test_3842b).
pymupdf.exception_info()
tpage = None
pymupdf.message("Falling back to full page OCR")
return full_ocr(page, dpi, language, flags)
Expand Down

0 comments on commit 210e553

Please sign in to comment.