From 4dad2e360c1c464feef9a8aaff6e96a7636c54b7 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sun, 14 Mar 2010 03:37:40 +0100 Subject: API: missing warg should not break awesome --- widgets/weather.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'widgets/weather.lua') diff --git a/widgets/weather.lua b/widgets/weather.lua index effa138..7a114c0 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -18,7 +18,9 @@ module("vicious.widgets.weather") -- {{{ Weather widget type -local function worker(format, station) +local function worker(format, warg) + if not warg then return end + -- Default values local weather = { ["{city}"] = "N/A", @@ -36,7 +38,7 @@ local function worker(format, station) -- Get weather forceast by the station ICAO code, from: -- * US National Oceanic and Atmospheric Administration local noaa = "http://weather.noaa.gov/pub/data/observations/metar/decoded/" - local f = io.popen("curl --connect-timeout 1 -fsm 3 "..noaa..station..".TXT") + local f = io.popen("curl --connect-timeout 1 -fsm 3 "..noaa..warg..".TXT") local ws = f:read("*all") f:close() -- cgit v1.2.3