Boost logo

Boost-Commit :

From: ghost_at_[hidden]
Date: 2007-10-14 05:09:41


Author: vladimir_prus
Date: 2007-10-14 05:09:41 EDT (Sun, 14 Oct 2007)
New Revision: 40006
URL: http://svn.boost.org/trac/boost/changeset/40006

Log:
Better diagnostics when trying to import non-callable Python
object to Jam.

Text files modified:
   trunk/tools/jam/src/builtins.c | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: trunk/tools/jam/src/builtins.c
==============================================================================
--- trunk/tools/jam/src/builtins.c (original)
+++ trunk/tools/jam/src/builtins.c 2007-10-14 05:09:41 EDT (Sun, 14 Oct 2007)
@@ -1691,7 +1691,11 @@
         return NULL;
     
     if (!PyCallable_Check(func))
+ {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Non-callable object passed to bjam.import_rule");
         return NULL;
+ }
     
     m = bindmodule(module);
     r = bindrule(rule, m);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk