VideoTexture: exception in C++ was not returning an error in Python. Added function name ini PyArg_ParseTuple.

This commit is contained in:
Benoit Bolsee
2009-05-24 23:12:38 +00:00
parent 4e0e720158
commit 323052068a
6 changed files with 21 additions and 13 deletions

View File

@@ -51,7 +51,7 @@ http://www.gnu.org/copyleft/lesser.txt.
// macro for exception handling and logging
#define CATCH_EXCP catch (Exception & exp) \
{ exp.report(); }
{ exp.report(); return NULL; }
// Blender GameObject type
@@ -280,7 +280,7 @@ PyObject * Texture_refresh (Texture * self, PyObject * args)
{
// get parameter - refresh source
PyObject * param;
if (!PyArg_ParseTuple(args, "O", &param) || !PyBool_Check(param))
if (!PyArg_ParseTuple(args, "O:refresh", &param) || !PyBool_Check(param))
{
// report error
PyErr_SetString(PyExc_TypeError, "The value must be a bool");