diff --git a/wifimgr.py b/wifimgr.py index f84869d..55a59b2 100644 --- a/wifimgr.py +++ b/wifimgr.py @@ -238,12 +238,12 @@ def handle_root(client): while len(ssids): ssid = ssids.pop(0) client.sendall("""\ - +
  • - {0} + {ssid}
  • - """.format(ssid)) + """.format(ssid=ssid)) client.sendall("""\
  • SSID @@ -262,7 +262,7 @@ def handle_root(client): Infos:

    - Your ssid and password information will be saved into the "{}" file in your ESP module for future usage. Be careful about security! + Your ssid and password information will be saved into the "{filename}" file in your ESP module for future usage. Be careful about security!

    Original code from cpopp/MicroPythonSamples. @@ -273,7 +273,7 @@ def handle_root(client): - """.format(NETWORK_PROFILES)) + """.format(filename=NETWORK_PROFILES)) client.close() @@ -298,14 +298,14 @@ def handle_configure(client, request): if do_connect(ssid, password): response = """\ - {} + {html_head}

    - ESP successfully connected to WiFi network "{}" + ESP successfully connected to WiFi network "{ssid}"

    - """.format(html_head, ssid) + """.format(html_head=html_head, ssid=ssid) send_response(client, response) try: profiles = read_profiles() @@ -320,15 +320,15 @@ def handle_configure(client, request): else: response = """\ - {} + {html_head}

    - ESP could not connect to WiFi network "{}" + ESP could not connect to WiFi network "{ssid}"

    - """.format(html_head, ssid) + """.format(html_head=html_head, ssid=ssid) send_response(client, response) return False