Skip to content

Commit dc633df

Browse files
authored
Update luftdaten.py
added decoding of bytestring to provide Python3 compatibility.
1 parent 847937a commit dc633df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/luftdaten.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def read_values():
7373
def get_cpu_temperature():
7474
process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
7575
output, _error = process.communicate()
76+
output = output.decode()
7677
return float(output[output.index('=') + 1:output.rindex("'")])
7778

7879

0 commit comments

Comments
 (0)