X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/c6fadc6871a4810aa29395a02d125d1380de7b49..d3cf8f992b0a987122155e72f15ee286ad8f7965:/widgets/weather.lua?ds=sidebyside diff --git a/widgets/weather.lua b/widgets/weather.lua index 559d4d2..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)