From af8d55ec7bbba4ea08626d6810413e652187955c Mon Sep 17 00:00:00 2001 From: "Jonathan Thorpe (Sony)" Date: Mon, 18 Dec 2023 16:38:22 +0000 Subject: [PATCH] Guard against missing class properties --- nmostesting/suites/IS1201Test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nmostesting/suites/IS1201Test.py b/nmostesting/suites/IS1201Test.py index 5cfa2f43..ea7f1d71 100644 --- a/nmostesting/suites/IS1201Test.py +++ b/nmostesting/suites/IS1201Test.py @@ -456,6 +456,14 @@ def check_object_properties(self, test, reference_class_descriptor, oid, context for class_property in reference_class_descriptor['properties']: response = self.get_property(test, oid, class_property.get('id'), context) + if response is None: + # Can't find this property - do we have an ID clash + self.device_model_metadata["error"] = True + self.device_model_metadata["error_msg"] += \ + "Property does not exist - it is possible that the class id for this class is NOT unique? " \ + + "classId: " + ".".join(map(str, reference_class_descriptor['classId'])) + continue + object_property = response["value"] if class_property["isDeprecated"]: