Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-09-03 10:43:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-09-03 10:43:07 +0400
commitcfa07e8d2bdc0a8db15082a692ce25c2fb010ae6 (patch)
tree91d652fffe244c607c022a45569556840be81a9a /source/gameengine/Expressions/PyObjectPlus.cpp
parentb818b1a16496b6c68443f8cfd56079df201560cf (diff)
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()
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.cpp')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index 8937f481922..1eca527151a 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -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;
}
/*------------------------------