Skip to content

Commit 2363750

Browse files
authored
MAINT: Change to document information dictionary (#3232)
1 parent 499cd9d commit 2363750

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pypdf/_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def _info(self) -> Optional[DictionaryObject]:
257257
info = info.get_object()
258258
if not isinstance(info, DictionaryObject):
259259
raise PdfReadError(
260-
"Trailer not found or does not point to document information directory"
260+
"Trailer not found or does not point to a document information dictionary"
261261
)
262262
return info
263263

tests/test_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_broken_meta_data(pdf_path):
155155
reader = PdfReader(BytesIO(b.replace(b"/Info 2 0 R", b"/Info 2 ")))
156156
with pytest.raises(PdfReadError) as exc:
157157
reader.metadata
158-
assert "does not point to document information directory" in repr(exc)
158+
assert "does not point to a document information dictionary" in repr(exc)
159159

160160

161161
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)