aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJ08nY2025-02-04 16:05:09 +0100
committerJ08nY2025-02-04 16:05:09 +0100
commit5e7ce331e8a1358e68017560e73f9d278f835daa (patch)
treeb6466bef9555c375f3e0f728b5b91e27e4e244d5 /src
parentc7c5947258ceba795ddfca3eec3ce2654cc1097b (diff)
downloadsec-certs-5e7ce331e8a1358e68017560e73f9d278f835daa.tar.gz
sec-certs-5e7ce331e8a1358e68017560e73f9d278f835daa.tar.zst
sec-certs-5e7ce331e8a1358e68017560e73f9d278f835daa.zip
Fix #470.
Bad bad bs4!
Diffstat (limited to 'src')
-rw-r--r--src/sec_certs/sample/protection_profile.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/sec_certs/sample/protection_profile.py b/src/sec_certs/sample/protection_profile.py
index 31dedcc2..35eab2dc 100644
--- a/src/sec_certs/sample/protection_profile.py
+++ b/src/sec_certs/sample/protection_profile.py
@@ -156,34 +156,34 @@ class ProtectionProfile(
@staticmethod
def _html_row_get_name(cell: Tag) -> str:
- return cell.find_all("a")[0].string
+ return str(cell.find_all("a")[0].string)
@staticmethod
def _html_row_get_link(cell: Tag) -> str:
- return constants.CC_PORTAL_BASE_URL + cell.find_all("a")[0].get("href")
+ return constants.CC_PORTAL_BASE_URL + str(cell.find_all("a")[0].get("href"))
@staticmethod
def _html_row_get_version(cell: Tag) -> str:
- return cell.text
+ return str(cell.text)
@staticmethod
def _html_row_get_security_level(cell: Tag) -> set[str]:
- return set(cell.stripped_strings)
+ return set(map(str, cell.stripped_strings))
@staticmethod
def _html_row_get_scheme(cell: Tag) -> str | None:
- schemes = list(cell.stripped_strings)
+ schemes = list(map(str, cell.stripped_strings))
return schemes[0] if schemes else None
@staticmethod
def _html_row_get_collaborative_name(cell: Tag) -> str:
- return list(cell.stripped_strings)[0]
+ return list(map(str, cell.stripped_strings))[0]
@staticmethod
def _html_row_get_collaborative_pp_link(cell: Tag) -> str:
- return constants.CC_PORTAL_BASE_URL + [x for x in cell.find_all("a") if x.string == "Protection Profile"][
- 0
- ].get("href")
+ return constants.CC_PORTAL_BASE_URL + str(
+ [x for x in cell.find_all("a") if x.string == "Protection Profile"][0].get("href")
+ )
@dataclass
class InternalState(ComplexSerializableType):