fix: use get to access network key
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/unit-test Pipeline was successful
ci/woodpecker/push/sanity-test Pipeline was successful
ci/woodpecker/push/build-package Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful
ci/woodpecker/tag/lint Pipeline was successful
ci/woodpecker/tag/unit-test Pipeline was successful
ci/woodpecker/tag/sanity-test Pipeline was successful
ci/woodpecker/tag/build-package Pipeline failed
ci/woodpecker/tag/docs unknown status
ci/woodpecker/tag/notify Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-03-26 13:11:35 +01:00
parent 1d7240fff6
commit cc5a102211
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -200,7 +200,7 @@ class InventoryModule(BaseInventoryPlugin):
if networks and isinstance(networks, list):
for network in networks:
for ip_address in network["ip-addresses"]:
for ip_address in network.get("ip-addresses", []):
address = validate(ip_address["ip-address"])
else:
try: