mirror of https://github.com/lcpz/lain.git
weather.forecast_update: forgot to add check on err
This commit is contained in:
parent
973b56ce0b
commit
f31134fd1c
|
@ -75,7 +75,7 @@ local function worker(args)
|
|||
f:close()
|
||||
weather_now, pos, err = json.decode(j, 1, nil)
|
||||
|
||||
if tonumber(weather_now["cod"]) == 200 then
|
||||
if not err and tonumber(weather_now["cod"]) == 200 then
|
||||
weather.notification_text = ''
|
||||
for i = 1, weather_now["cnt"] do
|
||||
local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"])))
|
||||
|
|
Loading…
Reference in New Issue