X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/b92942b0e07f4491cf5d96fecee94b1e82675e52..2e8fd41bc3ca120ae71658aeda98bcb91a0fd9d9:/widgets/weather.lua?ds=sidebyside diff --git a/widgets/weather.lua b/widgets/weather.lua index 77d9b9b..53ae838 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -71,7 +71,7 @@ local function worker(args) function weather.forecast_update() local cmd = string.format(forecast_call, city_id, units, lang, cnt) async.request(cmd, function(f) - j = f:read("*a") + j = f:read("*all") f:close() weather_now, pos, err = json.decode(j, 1, nil) @@ -79,7 +79,7 @@ local function worker(args) weather.notification_text = '' for i = 1, weather_now["cnt"] do local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"]))) - day = string.gsub(f:read("a"), "\n", "") + day = string.gsub(f:read("*all"), "\n", "") f:close() tmin = math.floor(weather_now["list"][i]["temp"]["min"]) @@ -103,7 +103,7 @@ local function worker(args) function weather.update() local cmd = string.format(current_call, city_id, units, lang) async.request(cmd, function(f) - j = f:read("*a") + j = f:read("*all") f:close() weather_now, pos, err = json.decode(j, 1, nil)