From 8f15c4d8a1415bca35d8c70a5f91aa1f1def9a66 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 12 Dec 2005 14:42:54 +0000 Subject: display error messages if calling __init__ or _del caused an exception better error message for reload with invalid args svn path=/trunk/; revision=4198 --- externals/grill/py/source/pyext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'externals/grill/py') diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp index b3cafb8a..d7449200 100644 --- a/externals/grill/py/source/pyext.cpp +++ b/externals/grill/py/source/pyext.cpp @@ -262,6 +262,7 @@ bool pyext::DoInit() } Py_DECREF(init); } + else // __init__ has not been found - don't care PyErr_Clear(); @@ -402,7 +403,7 @@ void pyext::Load() int inl = -1,outl = -1; ok = InitInOut(inl,outl); - if(inl != inlets || outl != outlets) + if((inl >= 0 && inl != inlets) || (outl >= 0 && outl != outlets)) post("%s - Inlet and outlet count can't be changed by reload",thisName()); } -- cgit v1.2.1