Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
Dead macs are now removed when retesting
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris230291 committed Sep 15, 2023
1 parent b54e94e commit e6aefff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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

Expand Down

0 comments on commit e6aefff

Please sign in to comment.