Skip to content

Commit d7f7122

Browse files
committed
Swap from ord() to bytes
1 parent adfd58d commit d7f7122

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/compensated-temperature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
def get_cpu_temperature():
3333
process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
3434
output, _error = process.communicate()
35-
return float(output[output.index(ord('=')) + 1:output.rindex(ord("'"))])
35+
return float(output[output.index(b'=') + 1:output.rindex(b"'")])
3636

3737

3838
factor = 1.0 # Smaller numbers adjust temp down, vice versa

0 commit comments

Comments
 (0)