From 8002beaff92624ee40769771b025dd6411710f35 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 15 Dec 2021 09:05:53 +0000 Subject: [PATCH] remove old NWs from wpa_supplicant --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 86e5ceb..b6c9196 100755 --- a/server.py +++ b/server.py @@ -278,7 +278,10 @@ def edit_wpa_sup(country, ssid, pwd): current_wpa.close() - + #remove this line to append to end instead of overwriting all networks + wpa_lines = wpa_lines[0:4] + print(wpa_lines) + wpa_lines.append('\n') wpa_lines.append('network={\n') wpa_lines.append('\tssid="{}"\n'.format(ssid))