From 8df9af0c4acd0b35291b7f90f6fefd0fb9d4bef0 Mon Sep 17 00:00:00 2001 From: Panagiotis Famelis <pfamelis@ubitech.eu> Date: Wed, 1 Feb 2023 15:53:31 +0200 Subject: [PATCH] fix: Check if endpoints returned are None --- src/device/service/Tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index 05610e1d2..17edcfaf9 100644 --- a/src/device/service/Tools.py +++ b/src/device/service/Tools.py @@ -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') -- GitLab