Suppress missing jbig2dec warning message

Windows users can't resolve it easily.
This commit is contained in:
James R. Barlow
2024-07-22 14:54:40 -07:00
parent 5256e74d0c
commit 46b49cc176
+3 -1
View File
@@ -268,7 +268,9 @@ def check_pdf(input_file: Path) -> bool:
return False
else:
with pdf:
messages = pdf.check()
with warnings.catch_warnings():
warnings.filterwarnings('ignore', message=r'pikepdf.*JBIG2.*')
messages = pdf.check()
success = True
for msg in messages:
if 'error' in msg.lower():