[pypy-svn] r15352 - pypy/dist/pypy/rpython

arigo at codespeak.net arigo at codespeak.net
Fri Jul 29 16:12:53 CEST 2005


Author: arigo
Date: Fri Jul 29 16:12:51 2005
New Revision: 15352

Modified:
   pypy/dist/pypy/rpython/exceptiondata.py
Log:
Only put standard exceptions in the pyexcclass2exc() table.


Modified: pypy/dist/pypy/rpython/exceptiondata.py
==============================================================================
--- pypy/dist/pypy/rpython/exceptiondata.py	(original)
+++ pypy/dist/pypy/rpython/exceptiondata.py	Fri Jul 29 16:12:51 2005
@@ -72,7 +72,7 @@
             if (clsdef and clsdef.cls is not Exception
                 and issubclass(clsdef.cls, Exception)):
                 cls = clsdef.cls
-                if not clsdef.attrs:
+                if cls.__module__ == 'exceptions' and not clsdef.attrs:
                     r_inst = rclass.getinstancerepr(rtyper, clsdef)
                     r_inst.setup()
                     example = malloc(r_inst.lowleveltype.TO, immortal=True)



More information about the Pypy-commit mailing list