From d0ae0a438634f8edbc6de5faa09aa239db0372b7 Mon Sep 17 00:00:00 2001 From: Florian LAUNAY Date: Tue, 1 Oct 2024 07:43:10 +0000 Subject: [PATCH] set nameservers to default empty value in network config v2 parser --- cloudbaseinit/metadata/services/nocloudservice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbaseinit/metadata/services/nocloudservice.py b/cloudbaseinit/metadata/services/nocloudservice.py index 987a6161..9bb6d5b4 100644 --- a/cloudbaseinit/metadata/services/nocloudservice.py +++ b/cloudbaseinit/metadata/services/nocloudservice.py @@ -332,7 +332,7 @@ def _parse_addresses(self, item, link_name): gateway=gateway) routes.append(route) - nameservers = item.get("nameservers") + nameservers = item.get("nameservers", {}) nameserver_addresses = nameservers.get("addresses", []) \ if nameservers else [] searches = nameservers.get("search", [])