From 38a0b2a9adab72a39039cd2a7dffb72120846ad1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 7 Sep 2009 17:32:31 +0200 Subject: Make Python dir() function work with ethtool.etherinfo objects --- python-ethtool/etherinfo_obj.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'python-ethtool') diff --git a/python-ethtool/etherinfo_obj.c b/python-ethtool/etherinfo_obj.c index cfdd492..264a823 100644 --- a/python-ethtool/etherinfo_obj.c +++ b/python-ethtool/etherinfo_obj.c @@ -108,8 +108,7 @@ PyObject *_ethtool_etherinfo_getter(etherinfo_py *self, PyObject *attr_o) } else if( strcmp(attr, "ipv6_netmask") == 0 ) { return PyInt_FromLong(self->info->ipv6_netmask); } - PyErr_SetString(PyExc_AttributeError, "Unknown attribute name"); - return NULL; + return PyObject_GenericGetAttr((PyObject *)self, attr_o); } -- cgit