kopia lustrzana https://github.com/tayfunulu/WiFiManager
cleanup extending passwd.dat
rodzic
23af7385b0
commit
278144a911
|
@ -106,14 +106,13 @@ def handle_configure(client, request):
|
||||||
<br><br>"""
|
<br><br>"""
|
||||||
send_response(client, response_footer)
|
send_response(client, response_footer)
|
||||||
try:
|
try:
|
||||||
with open("passwd.dat", "r") as fo:
|
with open("passwd.dat", "r") as f:
|
||||||
ex_data = fo.read()
|
ex_data = f.read()
|
||||||
ex_data = ssid + ";" + password + "\n" + ex_data
|
|
||||||
with open("passwd.dat", "w") as fo:
|
|
||||||
fo.write(ex_data)
|
|
||||||
except:
|
except:
|
||||||
with open("passwd.dat", "w") as fo:
|
ex_data = ""
|
||||||
fo.write(ssid + ";" + password + "\n")
|
ex_data = "%s;%s\n" % (ssid, password) + ex_data
|
||||||
|
with open("passwd.dat", "w") as f:
|
||||||
|
f.write(ex_data)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
response_footer = """
|
response_footer = """
|
||||||
|
|
Ładowanie…
Reference in New Issue