From b7fbde4042a9275e9454acb6e586896319cf1455 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Sat, 4 Jan 2014 12:23:24 +0100 Subject: [PATCH] #18 fixed --- widgets/temp.lua | 10 ++++++++-- wiki | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/widgets/temp.lua b/widgets/temp.lua index b57c477..b55d52f 100644 --- a/widgets/temp.lua +++ b/widgets/temp.lua @@ -28,8 +28,14 @@ local function worker(args) function update() local f = io.open("/sys/class/thermal/thermal_zone0/temp") - coretemp_now = tonumber(f:read("*all")) / 1000 - f:close() + if f ~= nil + then + coretemp_now = tonumber(f:read("*all")) / 1000 + f:close() + else + coretemp_now = "N/A" + end + widget = temp.widget settings() end diff --git a/wiki b/wiki index c8e07d2..07a230f 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit c8e07d2ec34cfb12907e4ccb5f29908aa8c98f5a +Subproject commit 07a230fb1654cc6abc1bd1ea8b36d8dcb3c1ad62