mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
py_panda: fix TypeError being raised instead of AttributeError
This prevented doing something like hasattr(vec3, "stuff")
This commit is contained in:
parent
8d14705689
commit
8375340582
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user