mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -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'",
|
"'%.100s' object has no attribute '%.200s'",
|
||||||
Py_TYPE(obj)->tp_name, attribute);
|
Py_TYPE(obj)->tp_name, attribute);
|
||||||
|
|
||||||
Py_INCREF(PyExc_TypeError);
|
Py_INCREF(PyExc_AttributeError);
|
||||||
PyErr_Restore(PyExc_TypeError, message, nullptr);
|
PyErr_Restore(PyExc_AttributeError, message, nullptr);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user