aboutsummaryrefslogtreecommitdiff
path: root/hddtemp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'hddtemp.lua')
-rw-r--r--hddtemp.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/hddtemp.lua b/hddtemp.lua
index 9e35b5f..11952b9 100644
--- a/hddtemp.lua
+++ b/hddtemp.lua
@@ -4,6 +4,7 @@
---------------------------------------------------
-- {{{ Grab environment
+local tonumber = tonumber
local io = { popen = io.popen }
local setmetatable = setmetatable
local string = { match = string.match }
@@ -27,7 +28,7 @@ local function worker(format, port)
local disk, temp = string.match(line, "|([%/%a]+)|.*|([%d]+)|[CF]+|")
if disk ~= nil and temp ~= nil then
- hdd_temp["{"..disk.."}"] = temp
+ hdd_temp["{"..disk.."}"] = tonumber(temp)
end
end
f:close()