mirror of
https://github.com/powerline/powerline.git
synced 2025-07-21 04:44:55 +02:00
Merge commit 'a272c6a' into develop
This commit is contained in:
commit
5ebf0875b8
@ -150,7 +150,10 @@ try:
|
|||||||
return if_io.bytes_recv, if_io.bytes_sent
|
return if_io.bytes_recv, if_io.bytes_sent
|
||||||
|
|
||||||
def _get_interfaces():
|
def _get_interfaces():
|
||||||
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)
|
||||||
for interface, data in io_counters.items():
|
for interface, data in io_counters.items():
|
||||||
if data:
|
if data:
|
||||||
yield interface, data.bytes_recv, data.bytes_sent
|
yield interface, data.bytes_recv, data.bytes_sent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user