Skip to content
Snippets Groups Projects
Commit 12aced68 authored by Timon's avatar Timon
Browse files

overwrite wifi config with syntax errors with default values

parent 972a6b4f
No related branches found
No related tags found
1 merge request!585overwrite wifi config with syntax errors with default values
Pipeline #9292 passed
......@@ -46,7 +46,19 @@ class WifiApp(Application):
if os.path.exists(self.WIFI_CONFIG_FILE):
with open(self.WIFI_CONFIG_FILE) as f:
try:
self._wifi_config = json.load(f)
except ValueError as e:
print("Error loading wifi config:", str(e))
print("Writing default config")
self._wifi_config = {
"config_version": 2,
"networks": {
"Example SSID": {"psk": "Example PSK"},
"Camp2023-open": {"psk": None},
},
}
self.save_config_json()
else:
self._wifi_config = {
"config_version": 2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment