From: luke bonham Date: Fri, 3 Jul 2015 16:05:22 +0000 (+0200) Subject: weather.forecast_update: forgot to add check on err X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/8468b88f4a6fd21042253d463c500f6da6f6d2fc?ds=sidebyside;hp=--cc;pf=etc weather.forecast_update: forgot to add check on err --- 8468b88f4a6fd21042253d463c500f6da6f6d2fc diff --git a/widgets/weather.lua b/widgets/weather.lua index d8dfd3f..c69d02b 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -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"])))