mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
fix an oops
This commit is contained in:
parent
b71ab5d081
commit
61cfd40824
@ -110,7 +110,11 @@ __setattr__, PyObject *self, const string &attr_name, PyObject *assign) {
|
|||||||
// Validate the attribute name.
|
// Validate the attribute name.
|
||||||
for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) {
|
for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) {
|
||||||
if (*it < 'x' || *it > 'z') {
|
if (*it < 'x' || *it > 'z') {
|
||||||
return NULL;
|
PyTypeObject *tp = self->ob_type;
|
||||||
|
PyErr_Format(PyExc_AttributeError,
|
||||||
|
"'%.100s' object has no attribute '%.200s'",
|
||||||
|
tp->tp_name, attr_name.c_str());
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -124,7 +124,11 @@ __setattr__, PyObject *self, const string &attr_name, PyObject *assign) {
|
|||||||
// Validate the attribute name.
|
// Validate the attribute name.
|
||||||
for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) {
|
for (string::const_iterator it = attr_name.begin(); it < attr_name.end(); it++) {
|
||||||
if (*it < 'w' || *it > 'z') {
|
if (*it < 'w' || *it > 'z') {
|
||||||
return NULL;
|
PyTypeObject *tp = self->ob_type;
|
||||||
|
PyErr_Format(PyExc_AttributeError,
|
||||||
|
"'%.100s' object has no attribute '%.200s'",
|
||||||
|
tp->tp_name, attr_name.c_str());
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user