If no ipv4, pass
This commit is contained in:
parent
7fc1031f8e
commit
9edb21f1c4
1 changed files with 2 additions and 1 deletions
3
main.py
3
main.py
|
@ -39,7 +39,8 @@ 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]] = []
|
||||||
host_mac_ip[hmi[key]].append((hmi['hostname'],
|
if 'ipv4' in hmi:
|
||||||
|
host_mac_ip[hmi[key]].append((hmi['hostname'],
|
||||||
hmi['extension'],
|
hmi['extension'],
|
||||||
hmi['mac_address'],
|
hmi['mac_address'],
|
||||||
hmi['ipv4']))
|
hmi['ipv4']))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue