Skip to content

Commit

Permalink
refactor: use public attr instead of private method
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-awd committed Nov 26, 2023
1 parent 99539ef commit c9eb386
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 46 deletions.
89 changes: 45 additions & 44 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.11"
pyhanko = "0.20.1"
pyhanko = "^0.21.0"

[tool.poetry.group.dev.dependencies]
black = "^23.9.1"
Expand Down
2 changes: 1 addition & 1 deletion src/pdf2john/pdf2john.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, file_name: str, strict: bool = False):

with open(file_name, "rb") as doc:
self.pdf = PdfFileReader(doc, strict=strict)
self.encrypt_dict = self.pdf._get_encryption_params()
self.encrypt_dict = self.pdf.encrypt_dict

if not self.encrypt_dict:
logger.warning("%s is not encrypted", file_name)
Expand Down

0 comments on commit c9eb386

Please sign in to comment.