mirror of
https://github.com/powerline/powerline.git
synced 2025-04-08 19:25:04 +02:00
Fix latest psutil breaking network segment
This commit is contained in:
parent
c1ae7f3598
commit
d66806e506
@ -497,7 +497,10 @@ try:
|
||||
import psutil
|
||||
|
||||
def _get_bytes(interface):
|
||||
io_counters = psutil.network_io_counters(pernic=True)
|
||||
try:
|
||||
io_counters = psutil.net_io_counters(pernic=True)
|
||||
except AttributeError:
|
||||
io_counters = psutil.network_io_counters(pernic=True)
|
||||
if_io = io_counters.get(interface)
|
||||
if not if_io:
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user