If no ipv4, pass

This commit is contained in:
Gabriel Detraz 2020-06-20 11:44:42 +02:00 committed by root
parent 7fc1031f8e
commit 9edb21f1c4

View file

@ -39,6 +39,7 @@ def build_hmi(host_mac_ip, api_res, key):
for hmi in api_res: for hmi in api_res:
if hmi[key] not in host_mac_ip.keys(): if hmi[key] not in host_mac_ip.keys():
host_mac_ip[hmi[key]] = [] host_mac_ip[hmi[key]] = []
if 'ipv4' in hmi:
host_mac_ip[hmi[key]].append((hmi['hostname'], host_mac_ip[hmi[key]].append((hmi['hostname'],
hmi['extension'], hmi['extension'],
hmi['mac_address'], hmi['mac_address'],