summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bd92c5f)
added decoding of bytestring to provide Python3 compatibility.
def get_cpu_temperature():
process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
output, _error = process.communicate()
def get_cpu_temperature():
process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
output, _error = process.communicate()
+ output = output.decode()
return float(output[output.index('=') + 1:output.rindex("'")])
return float(output[output.index('=') + 1:output.rindex("'")])