summaryrefslogtreecommitdiffstats
path: root/python-ethtool/ethtool.c
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2013-09-13 20:18:57 +0200
committerDavid Sommerseth <davids@redhat.com>2013-09-13 20:18:57 +0200
commitd3f5fd74bdb903c032eca8ab4e391172d3162c76 (patch)
tree89da2c01762ecf0bb8cee3b195b36ecc329abb28 /python-ethtool/ethtool.c
parentf8b0e05c03add3d0bd7736c3e3f81e8eb28bc7c3 (diff)
downloadpython-ethtool-d3f5fd74bdb903c032eca8ab4e391172d3162c76.tar.gz
python-ethtool-d3f5fd74bdb903c032eca8ab4e391172d3162c76.tar.xz
python-ethtool-d3f5fd74bdb903c032eca8ab4e391172d3162c76.zip
Merge PyNetlinkIPv4Address and PyNetlinkIPv6Address classes
Simplify the overall implementation by reusing code more efficiently. The differences between the IPv4 and IPv6 implementation in libnl is minimal and can more easily be differentiated those few places its needed instead. Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'python-ethtool/ethtool.c')
-rw-r--r--python-ethtool/ethtool.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c
index a471726..7e7ff1d 100644
--- a/python-ethtool/ethtool.c
+++ b/python-ethtool/ethtool.c
@@ -969,9 +969,7 @@ PyMODINIT_FUNC initethtool(void)
PyModule_AddObject(m, "etherinfo", (PyObject *)&ethtool_etherinfoType);
// Prepare the ethtool IPv6 and IPv4 address types
- if (PyType_Ready(&ethtool_netlink_ipv6_address_Type) < 0)
- return;
- if (PyType_Ready(&ethtool_netlink_ipv4_address_Type))
+ if (PyType_Ready(&ethtool_netlink_ip_address_Type))
return;
// Setup constants