Skip to content

Commit

Permalink
fix getitem on fips dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjanovsky committed Dec 5, 2022
1 parent 4712279 commit f14dfe3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sec_certs/dataset/fips.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ def algorithm_dataset_path(self) -> Path:
return self.algorithms_dir / "algorithms.json"

def __getitem__(self, item: str) -> FIPSCertificate:
if len(item) < 5:
return super().__getitem__(fips_dgst(item))
else:
try:
return super().__getitem__(item)
except KeyError:
return super().__getitem__(fips_dgst(item))

def _extract_data_from_html_modules(self) -> None:
"""
Expand Down

0 comments on commit f14dfe3

Please sign in to comment.