diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-13 03:39:54 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-13 03:39:54 +0100 |
commit | febc91dda5fe6ceff8ca519d3ac2b98584912e6a (patch) | |
tree | cb6fb2e5a582c35e40fe4a6ac7274961b12293ac /hddtemp.lua | |
parent | 9338cb930bccb4f4e7352d308a448adabde54331 (diff) | |
download | vicious-legacy-febc91dda5fe6ceff8ca519d3ac2b98584912e6a.tar.xz |
hddtemp: minor style changes
Diffstat (limited to 'hddtemp.lua')
-rw-r--r-- | hddtemp.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hddtemp.lua b/hddtemp.lua index 4cf8636..7c1e1e0 100644 --- a/hddtemp.lua +++ b/hddtemp.lua @@ -21,13 +21,12 @@ local function worker(format, port) if port == nil then port = 7634 end -- Get info from the hddtemp daemon - local f = io.popen("curl --connect-timeout 1 -fsm 3 telnet://127.0.0.1:" .. port) + local f = io.popen("curl --connect-timeout 1 -fsm 3 telnet://127.0.0.1:"..port) local hdd_temp = {} for line in f:lines() do - for disk, temp in string.gmatch(line, "|([%/%a%d]+)|.-|([%d]+)|[CF]+|") - do - hdd_temp["{"..disk.."}"] = tonumber(temp) + for d, t in string.gmatch(line, "|([%/%a%d]+)|.-|([%d]+)|[CF]+|") do + hdd_temp["{"..d.."}"] = tonumber(t) end end f:close() |