Update LibreQoS.py

This commit is contained in:
Robert Chacón 2022-03-10 16:18:46 -07:00 committed by GitHub
parent 6fefdcc40d
commit 2025c0a7bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,6 +107,12 @@ def refreshShapers():
devicesForThisAP.append(device)
accessPoints.append((APname, apDownload, apUpload, parentSite, devicesForThisAP))
# Sort devices into bins by AP, for scenario shapeBySite = False
result = collections.defaultdict(list)
for d in devices:
result[d['AP']].append(d)
devicesByAP = list(result.values())
# If an AP is specified for a device in Shaper.csv, but AP is not listed in AccessPoints.csv, raise exception
for device in devices:
if (device['AP'] not in accessPointNamesOnly):