From: <pj...@us...> - 2008-07-12 00:33:23
|
Revision: 4896 http://jython.svn.sourceforge.net/jython/?rev=4896&view=rev Author: pjenvey Date: 2008-07-11 17:33:21 -0700 (Fri, 11 Jul 2008) Log Message: ----------- fix java exception names being prefixed with <unknown> in Python tracebacks Modified Paths: -------------- branches/asm/src/org/python/core/Py.java Modified: branches/asm/src/org/python/core/Py.java =================================================================== --- branches/asm/src/org/python/core/Py.java 2008-07-12 00:13:15 UTC (rev 4895) +++ branches/asm/src/org/python/core/Py.java 2008-07-12 00:33:21 UTC (rev 4896) @@ -999,7 +999,10 @@ } PyObject moduleName = type.__findattr__("__module__"); if (moduleName == null) { - buf.append("<unknown>"); + // XXX: Workaround the fact that PyClass lacks __module__ + if (!(type instanceof PyClass)) { + buf.append("<unknown>"); + } } else { String moduleStr = moduleName.toString(); if (!moduleStr.equals("exceptions")) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |