diff --git a/netbox_zabbix_sync.py b/netbox_zabbix_sync.py index 9dad31b..3d2e96f 100755 --- a/netbox_zabbix_sync.py +++ b/netbox_zabbix_sync.py @@ -60,16 +60,16 @@ def build_path(endpoint, list_of_dicts): This can be used to generate a joinable list to be used in hostgroups. """ - path = [] + item_path = [] itemlist = [i for i in list_of_dicts if i['name'] == endpoint] item = itemlist[0] if len(itemlist) == 1 else None - path.append(item['name']) + item_path.append(item['name']) while item['_depth'] > 0: itemlist = [i for i in list_of_dicts if i['name'] == str(item['parent'])] item = itemlist[0] if len(itemlist) == 1 else None - path.append(item['name']) - path.reverse() - return(path) + item_path.append(item['name']) + item_path.reverse() + return item_path def main(arguments): """Run the sync process."""