Skip to content

Commit 82857af

Browse files
committed
Add NetlinkIPaddress class to ethtool module and fix test
1 parent cc6fb69 commit 82857af

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

python-ethtool/ethtool.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,9 @@ MODULE_INIT_FUNC(ethtool)
955955
Py_INCREF(&PyEtherInfo_Type);
956956
PyModule_AddObject(m, "etherinfo", (PyObject *)&PyEtherInfo_Type);
957957

958+
Py_INCREF(&ethtool_netlink_ip_address_Type);
959+
PyModule_AddObject(m, "NetlinkIPaddress", (PyObject *)&ethtool_netlink_ip_address_Type);
960+
958961
return m;
959962
}
960963

tests/test_ethtool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def _verify_etherinfo_object(self, ei):
174174

175175
i6s = ei.get_ipv6_addresses()
176176
for i6 in i6s:
177-
self.assert_(isinstance(i6, ethtool.etherinfo_ipv6addr))
177+
self.assert_(isinstance(i6, ethtool.NetlinkIPaddress))
178178
self.assertIsString(i6.address)
179179
self.assertIsInt(i6.netmask)
180180
self.assertIsString(i6.scope)

0 commit comments

Comments
 (0)