Skip to content

Commit 38a0b2a

Browse files
author
David Sommerseth
committed
Make Python dir() function work with ethtool.etherinfo objects
1 parent ec9e13c commit 38a0b2a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python-ethtool/etherinfo_obj.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ PyObject *_ethtool_etherinfo_getter(etherinfo_py *self, PyObject *attr_o)
108108
} else if( strcmp(attr, "ipv6_netmask") == 0 ) {
109109
return PyInt_FromLong(self->info->ipv6_netmask);
110110
}
111-
PyErr_SetString(PyExc_AttributeError, "Unknown attribute name");
112-
return NULL;
111+
return PyObject_GenericGetAttr((PyObject *)self, attr_o);
113112
}
114113

115114

0 commit comments

Comments
 (0)