Update GS JPEG corruption warning for 10.7.0+
The JPEG truncation bug (1-15 bytes) persists in Ghostscript 10.7.0. Update the warning message to show the actual GS version instead of hardcoding "10.6.x", and remove the stale date reference. Also make the test warning filter match the new message format.
This commit is contained in:
+3
-6
@@ -19,14 +19,11 @@ from ocrmypdf.exceptions import ExitCode
|
||||
|
||||
|
||||
class Gs106WarningFilter(logging.Filter):
|
||||
"""Filter out expected Ghostscript 10.6.x warning from test logs."""
|
||||
"""Filter out expected Ghostscript 10.6+ JPEG encoding warning from test logs."""
|
||||
|
||||
def filter(self, record: logging.LogRecord) -> bool:
|
||||
# Allow all records except the expected Ghostscript 10.6.x warning
|
||||
return (
|
||||
"Ghostscript 10.6.x contains JPEG encoding errors"
|
||||
not in record.getMessage()
|
||||
)
|
||||
# Allow all records except the expected Ghostscript 10.6+ warning
|
||||
return "contains JPEG encoding errors" not in record.getMessage()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
||||
Reference in New Issue
Block a user