Update bpytop.py

I changed the ``os.getloadavg()`` to ``psutil.getloadavg()`` to fix the error:
```
/usr/lib/python3.9/site-packages/bpytop.py", line 2849, in _collect
    cls.load_avg = [round(lavg, 2) for lavg in os.getloadavg()]
AttributeError: module 'os' has no attribute 'getloadavg'
08/01/21 (09:35:18) | WARNING: Exiting with errorcode (1). Runtime 0:00:05
```
pull/236/head^2
Andrzej Raczkowski 2021-01-08 10:49:20 +01:00 committed by GitHub
parent 173adf8556
commit d57d0fc211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2846,7 +2846,7 @@ class CpuCollector(Collector):
errlog.exception(f'{e}')
else:
pass
cls.load_avg = [round(lavg, 2) for lavg in os.getloadavg()]
cls.load_avg = [round(lavg, 2) for lavg in psutil.getloadavg()]
cls.uptime = str(timedelta(seconds=round(time()-psutil.boot_time(),0)))[:-3]
if CONFIG.check_temp and cls.got_sensors: