From 12887b61fe4d789024c24b3f6310e8880c9188a8 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 25 Apr 2022 14:02:13 +0200 Subject: [PATCH] Don't fail hard if the Linode API doesn't return a list of instances --- platypush/backend/linode/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/linode/__init__.py b/platypush/backend/linode/__init__.py index 756eb2757..216a9f621 100644 --- a/platypush/backend/linode/__init__.py +++ b/platypush/backend/linode/__init__.py @@ -26,7 +26,7 @@ class LinodeBackend(SensorBackend): self.instances = set(instances or []) def process_data(self, data: Dict[str, dict], new_data: Optional[Dict[str, dict]] = None, **kwargs): - instances = data['instances'] + instances = data.get('instances', {}) old_instances = (self.data or {}).get('instances', {}) if self.instances: