Skip to content

Commit

Permalink
Use correct orthography of addresses types acronyms
Browse files Browse the repository at this point in the history
  • Loading branch information
Honny1 committed Jan 24, 2024
1 parent df3ebf3 commit 1c7968e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def _get_text_of_element(self, element_path):

def _get_list_of_addresses(self, type_):
out = []
path = f".//xccdf:target-facts/xccdf:fact[@name='urn:xccdf:fact:asset:identifier:{type_}']"
path = (
".//xccdf:target-facts/xccdf:fact"
f"[@name='urn:xccdf:fact:asset:identifier:{type_.lower()}']"
)
for address in self.test_results_el.findall(path, NAMESPACES):
out.append(address.text)
return out
Expand Down Expand Up @@ -58,7 +61,7 @@ def get_test_result(self):
scan_result_dict["profile_id"] = profile_name.get("idref")

target_addresses = {}
for type_ in ["mac", "ipv4", "ipv6"]:
for type_ in ["MAC", "IPv4", "IPv6"]:
target_addresses[type_] = self._get_list_of_addresses(type_)

scan_result_dict["target_addresses"] = target_addresses
Expand Down

0 comments on commit 1c7968e

Please sign in to comment.