From e6aefffb1413999686272e3321a1084eb082f59c Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 15 Sep 2023 01:50:23 +0100 Subject: [PATCH] Dead macs are now removed when retesting --- app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index fa75d6c..f06ffbd 100644 --- a/app.py +++ b/app.py @@ -290,6 +290,7 @@ def portalUpdate(): portals = getPortals() oldmacs = portals[id]["macs"] macsout = {} + deadmacs = [] for mac in newmacs: if retest or mac not in oldmacs.keys(): @@ -306,9 +307,10 @@ def portalUpdate(): "Successfully tested MAC({}) for Portal({})".format(mac, name), "success", ) - continue + if mac not in macsout.keys(): + deadmacs.append(mac) - if mac in oldmacs.keys(): + if mac in oldmacs.keys() and mac not in deadmacs: macsout[mac] = oldmacs[mac] continue