From eb9ef8abe2a96cc448f4aec610f861d9406c85da Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Mon, 25 Mar 2024 15:29:52 +0000 Subject: [PATCH] Fix possible error --- sysFanTemp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysFanTemp.py b/sysFanTemp.py index d680ef3..432a598 100755 --- a/sysFanTemp.py +++ b/sysFanTemp.py @@ -37,8 +37,9 @@ def main(): ## HDD temp on right hddTempString = "" + print(hddtempDict) for hddname in sorted(hddtempDict.keys()): - temp = hddtempDict[hddname]["temp"] + temp = hddtempDict[hddname].get("temp", -999.9) hddTempString += f"{hddname}: {temp}°C\n" p = Panel(hddTempString, title="HDD Temperature") p.height = 15