X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/e815650ecceedc5e6b68d8e5571ed8839d1c8d3d..4003d0963948f857fe53534b876ac9defe7e3fec:/widgets/temp.lua

diff --git a/widgets/temp.lua b/widgets/temp.lua
index 1e93848..a4ada52 100644
--- a/widgets/temp.lua
+++ b/widgets/temp.lua
@@ -29,9 +29,8 @@ local function worker(args)
 
     function update()
         local f = io.open(tempfile)
-        if f ~= nil
-        then
-            coretemp_now = tonumber(f:read("*a")) / 1000
+        if f then
+            coretemp_now = tonumber(f:read("*all")) / 1000
             f:close()
         else
             coretemp_now = "N/A"
@@ -42,6 +41,7 @@ local function worker(args)
     end
 
     newtimer("coretemp", timeout, update)
+
     return temp.widget
 end