fixed wifi info update

This commit is contained in:
dekunukem
2022-03-25 18:26:05 +00:00
parent 084cf09f9c
commit feec50409e

View File

@@ -91,10 +91,11 @@ network={{
}}
"""
to_write = config_str
if len(wifi_dict['wifi_password']) > 0:
if len(wifi_dict['wifi_password']) == 0:
to_write = config_str_unsecured
with open(config_file_path, 'w') as wifi_config_file:
wifi_config_file.write(to_write)
os.system("wpa_cli -i wlan0 reconfigure")
check_rpi_model()
@@ -119,4 +120,4 @@ while 1:
subprocess.call('echo 1 > /sys/module/bluetooth/parameters/disable_ertm')
print("DONE")
except Exception:
continue
continue