From 902288f30d5f5cdcf619950ebc5acc1976486f72 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Tue, 11 May 2021 11:23:06 +0200 Subject: [PATCH] [modules/sensors] do not truncate temperature use strip() instead of a sub-list to get the value for the temperature. fixes #787 --- bumblebee_status/modules/contrib/sensors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee_status/modules/contrib/sensors.py b/bumblebee_status/modules/contrib/sensors.py index 68b792a..8164f00 100644 --- a/bumblebee_status/modules/contrib/sensors.py +++ b/bumblebee_status/modules/contrib/sensors.py @@ -98,7 +98,7 @@ class Module(core.module.Module): try: temperature = open( self.parameter("path", "/sys/class/thermal/thermal_zone0/temp") - ).read()[:2] + ).read().strip() log.debug("retrieved temperature from /sys/class/") # TODO: Iterate through all thermal zones to determine the correct one and use its value # https://unix.stackexchange.com/questions/304845/discrepancy-between-number-of-cores-and-thermal-zones-in-sys-class-thermal