We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8ecf91f + d7f7122 commit 6b5c136Copy full SHA for 6b5c136
1 file changed
examples/compensated-temperature.py
@@ -32,7 +32,7 @@
32
def get_cpu_temperature():
33
process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
34
output, _error = process.communicate()
35
- return float(output[output.index('=') + 1:output.rindex("'")])
+ return float(output[output.index(b'=') + 1:output.rindex(b"'")])
36
37
38
factor = 1.0 # Smaller numbers adjust temp down, vice versa
0 commit comments