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:
authorKen Hughes <khughes@pacific.edu>2006-12-27 00:12:34 +0300
committerKen Hughes <khughes@pacific.edu>2006-12-27 00:12:34 +0300
commit7b14c36a1800ade761b8c4b95691ead20748e3ad (patch)
treeacf366d2bd17b6d2c0399e70300019c77b873e33 /source/blender/python/api2_2x/constant.c
parente6381a04d67ad8e4ea8a7cb9aef779ceeee9dbaa (diff)
Python API
---------- Bugfix: make Constant mp_subscript method return key error if key not found in dictionary.
Diffstat (limited to 'source/blender/python/api2_2x/constant.c')
-rw-r--r--source/blender/python/api2_2x/constant.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c
index 45af1f1b96d..0162ad99b6c 100644
--- a/source/blender/python/api2_2x/constant.c
+++ b/source/blender/python/api2_2x/constant.c
@@ -105,6 +105,8 @@ static PyObject *constantSubscript(BPy_constant *self, PyObject *key)
if(v) {
return EXPP_incr_ret(v);
}
+ return EXPP_ReturnPyObjError( PyExc_KeyError,
+ "key not found" );
}
return NULL;
}