py_panda: fix TypeError being raised instead of AttributeError

This prevented doing something like hasattr(vec3, "stuff")
This commit is contained in:
rdb 2018-10-07 20:24:19 +02:00
parent 8d14705689
commit 8375340582

View File

@ -235,8 +235,8 @@ PyObject *Dtool_Raise_AttributeError(PyObject *obj, const char *attribute) {
"'%.100s' object has no attribute '%.200s'",
Py_TYPE(obj)->tp_name, attribute);
Py_INCREF(PyExc_TypeError);
PyErr_Restore(PyExc_TypeError, message, nullptr);
Py_INCREF(PyExc_AttributeError);
PyErr_Restore(PyExc_AttributeError, message, nullptr);
return nullptr;
}