Verified Commit a42ef302 authored by Michal Hrusecky's avatar Michal Hrusecky 🦎 Committed by Štěpán Henek

time: Don't require WiFi uci config 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 dd430e06
Pipeline #47414 passed with stage
in 34 minutes and 54 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