We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b7904d commit 90f548aCopy full SHA for 90f548a
1 file changed
src/utils.py
@@ -185,9 +185,13 @@ def get_cpu_temp():
185
186
try:
187
temp = psutil.sensors_temperatures().get('coretemp', [{'current': 'N/A'}])[0]
188
+ current_temp = temp.get('current', 'N/A')
189
+ high_temp = temp.get('high', 'N/A')
190
+ critical_temp = temp.get('critical', 'N/A')
191
+ return (current_temp, high_temp, critical_temp)
192
except Exception:
193
return ("N/A", "N/A", "N/A")
- return temp.current, temp.high, temp.critical
194
+
195
196
def get_top_processes(number=5):
197
"""Get the top processes by memory usage.
0 commit comments