Skip to content

Commit

Permalink
Handle more comma styles in uptime command output of Capabilities.upt…
Browse files Browse the repository at this point in the history
…ime_loadavg()
  • Loading branch information
ohinckel committed Jul 28, 2024
1 parent 086f46a commit e3c2a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framarama/base/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def df_tmp():

def uptime_loadavg():
_info = Process.exec_run(['uptime'])
return float(_info.split()[-3].rstrip(b',')) if _info else None
return float(_info.split()[-3].rstrip(b' ').strip(b',').replace(b',', b'.')) if _info else None

def read_thermal():
_info = Filesystem.file_read('/sys/class/thermal/thermal_zone0/temp')
Expand Down

0 comments on commit e3c2a5a

Please sign in to comment.