From 7fe9537be4edc3a4ddf38dfc35170e94a484c129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Fri, 9 Sep 2022 10:14:14 -0600 Subject: [PATCH] Fix https://github.com/rchac/LibreQoS/issues/61#issuecomment-1242174431 --- v1.2/LibreQoS.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/v1.2/LibreQoS.py b/v1.2/LibreQoS.py index 3bac34c6..f3454242 100644 --- a/v1.2/LibreQoS.py +++ b/v1.2/LibreQoS.py @@ -536,12 +536,12 @@ def refreshShapers(): for device in circuit['devices']: if device['deviceName'] not in devicesShaped: devicesSkipped.append((device['deviceName'],device['deviceID'])) - - warnings.warn('Some devices were not shaped. Please check to ensure they have a valid ParentNode listed in ShapedDevices.csv:', stacklevel=2) - print("Devices not shaped:") - for entry in devicesSkipped: - name, idNum = entry - print('DeviceID: ' + idNum + '\t DeviceName: ' + name) + if len(devicesSkipped) > 0: + warnings.warn('Some devices were not shaped. Please check to ensure they have a valid ParentNode listed in ShapedDevices.csv:', stacklevel=2) + print("Devices not shaped:") + for entry in devicesSkipped: + name, idNum = entry + print('DeviceID: ' + idNum + '\t DeviceName: ' + name) # Save for stats with open('statsByCircuit.json', 'w') as infile: