From bf354edeae8513cda96d31eb488ce454d35134c0 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 10 Oct 2018 15:48:18 -0600 Subject: [PATCH] Fix hw-sensor bug caused by upstream code --- .bin/Scripts/hw-sensors | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/hw-sensors b/.bin/Scripts/hw-sensors index 2a1a46e0..f251c589 100755 --- a/.bin/Scripts/hw-sensors +++ b/.bin/Scripts/hw-sensors @@ -67,7 +67,11 @@ def get_feature_string(chip, feature): for sf in sfs: name = sf.name[skipname:].decode("utf-8").strip() - val = sensors.get_value(chip, sf.number) + try: + val = sensors.get_value(chip, sf.number) + except Exception: + # Ignore upstream sensor bugs and lie instead + val = -123456789 if 'alarm' in name: # Skip continue