From 4602ca2fa5e8e2e408713f72ae7e4cd14480bc01 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Mon, 5 Oct 2009 00:10:47 +0200 Subject: Lots of coding style changes --- hddtemp.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hddtemp.lua') diff --git a/hddtemp.lua b/hddtemp.lua index 7bdb764..9e35b5f 100644 --- a/hddtemp.lua +++ b/hddtemp.lua @@ -6,6 +6,7 @@ -- {{{ Grab environment local io = { popen = io.popen } local setmetatable = setmetatable +local string = { match = string.match } -- }}} @@ -23,7 +24,7 @@ local function worker(format, port) local hdd_temp = {} for line in f:lines() do - local disk, temp = line:match("|([%/%a]+)|.*|([%d]+)|[CF]+|") + local disk, temp = string.match(line, "|([%/%a]+)|.*|([%d]+)|[CF]+|") if disk ~= nil and temp ~= nil then hdd_temp["{"..disk.."}"] = temp -- cgit v1.2.3