Fixed cpu temp not showing when manually selected and not auto deteced

pull/135/head
aristocratos 2020-09-21 16:35:38 +02:00
parent 0de2903045
commit 85adc7f285
1 changed files with 2 additions and 0 deletions

View File

@ -2622,6 +2622,8 @@ class CpuCollector(Collector):
elif which("osx-cpu-temp") and subprocess.check_output("osx-cpu-temp", text=True).rstrip().endswith("°C"):
cls.sensor_method = "osx-cpu-temp"
except: pass
elif CONFIG.cpu_sensor != "Auto" and CONFIG.cpu_sensor in CONFIG.cpu_sensors:
cls.sensor_method = "psutil"
elif hasattr(psutil, "sensors_temperatures"):
try:
temps = psutil.sensors_temperatures()