From 31a3fb79612e56fd6549c3f8ce26a83db87032b2 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 20 Oct 2023 02:52:10 +0100 Subject: [PATCH] Fixed error messages wrongly appearing --- app.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index f06ffbd..26d56e9 100644 --- a/app.py +++ b/app.py @@ -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 @@ -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)