mirror of https://github.com/aristocratos/bpytop
Fixed getsensors detection of vcgencmd
parent
2942a44f9b
commit
7593363165
|
@ -2442,7 +2442,7 @@ class CpuCollector(Collector):
|
||||||
except: pass
|
except: pass
|
||||||
if not cls.sensor_method and SYSTEM == "Linux":
|
if not cls.sensor_method and SYSTEM == "Linux":
|
||||||
try:
|
try:
|
||||||
if which("vcgencmd") and subprocess.check_output("vcgencmd measure_temp", text=True).rstrip().endswith("'C"):
|
if which("vcgencmd") and subprocess.check_output(["vcgencmd", "measure_temp"], text=True).strip().endswith("'C"):
|
||||||
cls.sensor_method = "vcgencmd"
|
cls.sensor_method = "vcgencmd"
|
||||||
except: pass
|
except: pass
|
||||||
cls.got_sensors = True if cls.sensor_method else False
|
cls.got_sensors = True if cls.sensor_method else False
|
||||||
|
|
Loading…
Reference in New Issue