Skip to content

Commit

Permalink
[modules/sensors] do not truncate temperature
Browse files Browse the repository at this point in the history
use strip() instead of a sub-list to get the value for the temperature.

fixes #787
  • Loading branch information
tobi-wan-kenobi committed May 11, 2021
1 parent 7f03c9c commit 902288f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bumblebee_status/modules/contrib/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_temp(self):
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
Expand Down

0 comments on commit 902288f

Please sign in to comment.