Fix possible error

This commit is contained in:
2024-03-25 15:29:52 +00:00
parent ea23feb443
commit eb9ef8abe2

View File

@@ -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