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

Commit

Permalink
Fixed error messages wrongly appearing
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris230291 committed Oct 20, 2023
1 parent e6aefff commit 31a3fb7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,16 @@ def portalUpdate():
"Successfully tested MAC({}) for Portal({})".format(mac, name),
"success",
)
if mac not in macsout.keys():

if mac not in list(macsout.keys()):
deadmacs.append(mac)

if mac in oldmacs.keys() and mac not in deadmacs:
macsout[mac] = oldmacs[mac]
continue

logger.error("Error testing MAC({}) for Portal({})".format(mac, name))
flash("Error testing MAC({}) for Portal({})".format(mac, name), "danger")
if mac not in macsout.keys():
logger.error("Error testing MAC({}) for Portal({})".format(mac, name))
flash("Error testing MAC({}) for Portal({})".format(mac, name), "danger")

if len(macsout) > 0:
portals[id]["enabled"] = enabled
Expand Down Expand Up @@ -1182,5 +1183,5 @@ def lineup():

if __name__ == "__main__":
config = loadConfig()
waitress.serve(app, port=8001, _quiet=True, threads=24)
# app.run(host="0.0.0.0", port=8001, debug=debug)
#waitress.serve(app, port=8001, _quiet=True, threads=24)
app.run(host="0.0.0.0", port=8001, debug=debug)

0 comments on commit 31a3fb7

Please sign in to comment.