We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b97d57 commit 7712810Copy full SHA for 7712810
src/utils.py
@@ -198,11 +198,11 @@ def get_cpu_temp():
198
return (current_temp, high_temp, critical_temp)
199
else:
200
# If no 'coretemp' sensors found, return 'N/A'
201
- return ("N/A", "N/A", "N/A")
+ return (0, 0, 0)
202
203
except Exception as e:
204
logger.warning(f"Error getting CPU temperature: {e}")
205
206
207
208
def get_top_processes(number=5):
@@ -394,7 +394,7 @@ def _get_system_info():
394
'memory_percent': round(memory_info.percent, 2),
395
'disk_percent': round(disk_info.percent, 2),
396
'network_sent': network_sent,
397
- 'battery_percent': round(battery_info.percent, 1) if battery_info else "N/A",
+ 'battery_percent': round(battery_info.percent, 1) if battery_info else 0,
398
'network_received': network_received,
399
"network_stats" : f"D: {network_received} MB / U: {network_sent} MB",
400
'dashboard_memory_usage': get_flask_memory_usage(),
0 commit comments