Verified Commit ea24b1a8 authored by Michal Hrusecky's avatar Michal Hrusecky 🐉
Browse files

Don't require WiFi to save time settings

Region settings affects WiFi region but as not all devices have WiFi, silently
ignore when it can't be set.
parent c4719dda
Pipeline #47228 passed with stage
in 34 minutes and 10 seconds
......@@ -100,9 +100,13 @@ class TimeUciCommands(object):
backend.set_option("system", "@system[0]", "_country", country)
backend.set_option("system", "@system[0]", "zonename", "%s/%s" % (region, city))
backend.set_option("system", "ntp", "enabled", store_bool(how_to_set_time == "ntp"))
data = backend.read("wireless")
# set regulatory domain for all wifi devices
WifiUci.update_regulator_domain(data, backend, country)
# Just in case we have no WiFi and no /etc/config/wireless
try:
data = backend.read("wireless")
# set regulatory domain for all wifi devices
WifiUci.update_regulator_domain(data, backend, country)
except UciException:
pass
# update wizard passed in foris web (best effort)
try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment