From c27dfa0c0a5522b8dfb3917740988360ae0b3e2e Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 23 Jul 2022 19:54:35 -0400 Subject: [PATCH] ENH add nifty warning message --- src/modules/processor.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/processor.lua b/src/modules/processor.lua index 23af000..44d43f5 100644 --- a/src/modules/processor.lua +++ b/src/modules/processor.lua @@ -85,7 +85,7 @@ return function(update_freq, config, main_state, common, width, point) cores[c] = create_core(dial_x, dial_y) end local coretemp_paths = cpu.get_coretemp_paths() - local update_coretemps = function() end + local update_coretemps if coretemp_paths ~= nil then update_coretemps = function() for conky_core_id, path in pairs(coretemp_paths) do @@ -93,6 +93,9 @@ return function(update_freq, config, main_state, common, width, point) common.text_circle_set(cores[conky_core_id].coretemp, temp) end end + else + i_o.warnf('could not find coretemp paths; disabling temp readings') + update_coretemps = function() end end local update = function() for _, load_data in pairs(mod_state) do