We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8ecf91f + 056049e commit adfd58dCopy full SHA for adfd58d
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(ord('=')) + 1:output.rindex(ord("'"))])
36
37
38
factor = 1.0 # Smaller numbers adjust temp down, vice versa
0 commit comments