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/cpufreq.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'widgets/cpufreq.lua') diff --git a/widgets/cpufreq.lua b/widgets/cpufreq.lua index 7f60f5a..f7c6a27 100644 --- a/widgets/cpufreq.lua +++ b/widgets/cpufreq.lua @@ -16,8 +16,10 @@ module("vicious.widgets.cpufreq") -- {{{ CPU frequency widget type -local function worker(format, cpuid) - local cpufreq = helpers.pathtotable("/sys/devices/system/cpu/"..cpuid.."/cpufreq") +local function worker(format, warg) + if not warg then return end + + local cpufreq = helpers.pathtotable("/sys/devices/system/cpu/"..warg.."/cpufreq") local governor_state = { ["ondemand\n"] = "↯", ["powersave\n"] = "⌁", -- cgit v1.2.3