BGE Py api, deleting properties didnt raise an error when the property wasnt there. also added some exception messages and renamed joystick getConnected() to isConnected()

This commit is contained in:
Campbell Barton
2008-09-03 06:43:07 +00:00
parent b818b1a164
commit cfa07e8d2b
4 changed files with 30 additions and 16 deletions

View File

@@ -119,6 +119,7 @@ PyObject *PyObjectPlus::_getattr(const STR_String& attr)
int PyObjectPlus::_delattr(const STR_String& attr)
{
PyErr_SetString(PyExc_AttributeError, "attribute cant be deleted");
return 1;
}
@@ -126,7 +127,8 @@ int PyObjectPlus::_setattr(const STR_String& attr, PyObject *value)
{
//return PyObject::_setattr(attr,value);
//cerr << "Unknown attribute" << endl;
return 1;
PyErr_SetString(PyExc_AttributeError, "attribute cant be set");
return 1;
}
/*------------------------------