Commit 8df9af0c authored by kesnar's avatar kesnar Committed by Vasilis Katopodis
Browse files

fix: Check if endpoints returned are None

parent 40fd6903
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ def populate_endpoints(device : Device, driver : _Driver, monitoring_loops : Mon
    results_getconfig = driver.GetConfig(resources_to_get)

    errors : List[str] = list()
    LOGGER.warning(results_getconfig)
    for endpoint in results_getconfig:
        if len(endpoint) != 2:
            errors.append(ERROR_BAD_ENDPOINT.format(device_uuid, str(endpoint)))
@@ -92,6 +93,8 @@ def populate_endpoints(device : Device, driver : _Driver, monitoring_loops : Mon
        if isinstance(resource_value, Exception):
            errors.append(ERROR_GET.format(device_uuid, str(resource_key), str(resource_value)))
            continue
        if resource_value is None:
            continue

        endpoint_uuid = resource_value.get('uuid')