From f661d8ba74c07bb451d67f3661d606d12806808e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Fri, 21 Oct 2022 07:56:51 -0600 Subject: [PATCH] Implement bug fix https://github.com/rchac/LibreQoS/pull/137 --- v1.2/integrationUISP.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/v1.2/integrationUISP.py b/v1.2/integrationUISP.py index 03c439df..dac82193 100644 --- a/v1.2/integrationUISP.py +++ b/v1.2/integrationUISP.py @@ -32,10 +32,13 @@ def createTree(sites,accessPoints,bandwidthDL,bandwidthUL,siteParentDict,siteIDt thisOnesParent = None aps = [] for ap in accessPoints: - thisOnesParent = ap['device']['site']['name'] - if thisOnesParent == currentNodeName: - if ap['device']['model'] in knownAPmodels: - aps.append(ap['device']['name']) + if ap['device']['site'] is None: + print("Unable to read site information for: " + ap['device']['name']) + else: + thisOnesParent = ap['device']['site']['name'] + if thisOnesParent == currentNodeName: + if ap['device']['model'] in knownAPmodels: + aps.append(ap['device']['name']) apDict = {} for ap in aps: maxDL = min(bandwidthDL[ap],bandwidthDL[currentNodeName])