Skip to content

Commit

Permalink
Better error message on service not found
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Sep 6, 2024
1 parent 029cf7d commit 63631e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/python_testing/TC_ICDM_5_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ async def _get_icd_txt_record(self) -> OperatingModeEnum:
compressed_fabric_id=self.default_controller.GetCompressedFabricId(),
log_output=True, discovery_timeout_sec=240)

asserts.assert_is_not_none(
service, f"Failed to get operational node service information for {self.dut_node_id} on {self.default_controller.GetCompressedFabricId()}")

icdTxtRecord = OperatingModeEnum(int(service.txt_record['ICD']))
if icdTxtRecord.value != int(service.txt_record['ICD']):
raise AttributeError(f'Not a known ICD type: {service.txt_record["ICD"]}')
Expand Down

0 comments on commit 63631e2

Please sign in to comment.