Check for ip-addresses before iterating over them

This commit is contained in:
johnpc35 2020-08-08 02:25:10 -04:00
parent 01dd5bc270
commit d9d990bd34
1 changed files with 18 additions and 17 deletions

View File

@ -218,6 +218,7 @@ class ProxmoxAPI(object):
pass
elif type(networks) is list:
for network in networks:
if 'ip-addresses' in network:
for ip_address in network['ip-addresses']:
try:
# IP address validation