summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-09-07 17:32:31 +0200
committerDavid Sommerseth <davids@redhat.com>2009-09-07 17:32:31 +0200
commit38a0b2a9adab72a39039cd2a7dffb72120846ad1 (patch)
tree18e66c514574e7606690f5206252750700025cf0
parentec9e13c0da2e6ebfb16e60c19c11539fa8b81442 (diff)
downloadpython-ethtool-38a0b2a9adab72a39039cd2a7dffb72120846ad1.tar.gz
python-ethtool-38a0b2a9adab72a39039cd2a7dffb72120846ad1.tar.xz
python-ethtool-38a0b2a9adab72a39039cd2a7dffb72120846ad1.zip
Make Python dir() function work with ethtool.etherinfo objects
-rw-r--r--python-ethtool/etherinfo_obj.c3
1 files changed, 1 insertions, 2 deletions
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);
}