From 9edb21f1c4bbd963c8b0df035bfb2fb6f6601c3e Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sat, 20 Jun 2020 11:44:42 +0200 Subject: [PATCH] If no ipv4, pass --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 47d7fc1..de405c3 100755 --- a/main.py +++ b/main.py @@ -39,7 +39,8 @@ def build_hmi(host_mac_ip, api_res, key): for hmi in api_res: if hmi[key] not in host_mac_ip.keys(): host_mac_ip[hmi[key]] = [] - host_mac_ip[hmi[key]].append((hmi['hostname'], + if 'ipv4' in hmi: + host_mac_ip[hmi[key]].append((hmi['hostname'], hmi['extension'], hmi['mac_address'], hmi['ipv4']))