From 537710a4b958b82e096baad2ede8ead54e50b8be Mon Sep 17 00:00:00 2001 From: Raymond Kuiper Date: Mon, 25 Mar 2024 11:56:17 +0100 Subject: [PATCH] Corrected pylint errors --- netbox_zabbix_sync.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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."""