mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-22 02:36:11 +00:00
The library fetches interface info by reading sysfs. However, "/sys/class/net/"
may contain certain files that are not interface names, like "bonding_master"
Skip over these files. Otherwise, the code fails with
File "/tmp/ansible_HkmKOM/ansible_module_network_connections.py", line 347,
in link_infos b = SysUtil._link_infos_fetch()
File "/tmp/ansible_HkmKOM/ansible_module_network_connections.py", line 323,
in _link_infos_fetch ifindex = SysUtil._link_read_ifindex(ifname)
File "/tmp/ansible_HkmKOM/ansible_module_network_connections.py", line 302,
in _link_read_ifindex c = SysUtil._sysctl_read('/sys/class/net/' + ifname + '/ifindex')
File "/tmp/ansible_HkmKOM/ansible_module_network_connections.py", line 293,
in _sysctl_read with open(filename, 'r') as f: IOError: [Errno 20] Not a directory: '/sys/class/net/bonding_masters/ifindex'
|
||
|---|---|---|
| .. | ||
| network_connections.py | ||
| test_network_connections.py | ||