From e3c2a5a94579e655b64a06818b4830115be4837d Mon Sep 17 00:00:00 2001 From: Oliver Hinckel Date: Sun, 28 Jul 2024 19:52:13 +0200 Subject: [PATCH] Handle more comma styles in uptime command output of Capabilities.uptime_loadavg() --- framarama/base/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framarama/base/device.py b/framarama/base/device.py index 2d2f29a3..39c61476 100755 --- a/framarama/base/device.py +++ b/framarama/base/device.py @@ -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')